| 1 | name: ci |
| 2 | on: |
| 3 | push: |
| 4 | tags: |
| 5 | - v* |
| 6 | branches: |
| 7 | - main |
| 8 | - release-* |
| 9 | pull_request: |
| 10 | |
| 11 | jobs: |
| 12 | test: |
| 13 | runs-on: ubuntu-24.04 |
| 14 | strategy: |
| 15 | fail-fast: false |
| 16 | matrix: |
| 17 | go-version: [1.24.x, 1.25.x] |
| 18 | race: ["-race", ""] |
| 19 | |
| 20 | steps: |
| 21 | |
| 22 | - name: checkout |
| 23 | uses: actions/checkout@v5 |
| 24 | |
| 25 | - name: install go ${{ matrix.go-version }} |
| 26 | uses: actions/setup-go@v6 |
| 27 | with: |
| 28 | stable: '!contains(${{ matrix.go-version }}, "beta") && !contains(${{ matrix.go-version }}, "rc")' |
| 29 | go-version: ${{ matrix.go-version }} |
| 30 | |
| 31 | - name: install bats |
| 32 | run: sudo apt-get update && sudo apt-get install bats |
| 33 | |
| 34 | - name: build |
| 35 | run: make build EXTRA_BUILD_FLAGS="${{ matrix.race }}" |
| 36 | |
| 37 | - name: unit tests |
| 38 | run: make test-unit EXTRA_TEST_FLAGS="${{ matrix.race }}" |
| 39 | |
| 40 | - name: integration tests |
| 41 | run: make test-integration |