Backport PreInit hook support, and deprecate PreBootstrap #891
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Tests | |
on: | |
pull_request: | |
push: | |
permissions: | |
contents: read | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
code-tests: | |
env: | |
CGO_CFLAGS: -I/home/runner/go/deps/dqlite/include/ | |
CGO_LDFLAGS: -L/home/runner/go/deps/dqlite/.libs/ | |
LD_LIBRARY_PATH: /home/runner/go/deps/dqlite/.libs/ | |
CGO_LDFLAGS_ALLOW: (-Wl,-wrap,pthread_create)|(-Wl,-z,now) | |
name: Code | |
runs-on: ubuntu-22.04 | |
strategy: | |
matrix: | |
go: ["1.22.x"] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Dependency Review | |
uses: actions/dependency-review-action@v4 | |
if: github.event_name == 'pull_request' | |
- name: Install Go (${{ matrix.go }}) | |
uses: actions/setup-go@v5 | |
with: | |
go-version: ${{ matrix.go }} | |
- name: Check compatibility with min Go version (${{ matrix.go }}) | |
run: | | |
set -eux | |
GOMIN="$(sed -n 's/^GOMIN=\([0-9.]\+\)$/\1/p' Makefile)" | |
go mod tidy -go="${GOMIN}" | |
- name: Install dependencies | |
run: | | |
set -eux | |
sudo apt-get update | |
sudo apt-get install --no-install-recommends -y \ | |
pkg-config autoconf automake libtool make libuv1-dev libsqlite3-dev liblz4-dev | |
- name: Build dependencies | |
run: | | |
set -eux | |
make deps | |
- name: Run static analysis | |
run: | | |
set -eux | |
make check-static | |
make -C example check-static | |
- name: Unit tests (all) | |
run: | | |
set -eux | |
make check-unit | |
make -C example check-unit | |
- name: Example system tests | |
run: | | |
set -eux | |
make -C example | |
cd example/test | |
CLUSTER_VERBOSE=1 ./main.sh |