Repository navigation
test: wait for goroutines to exit before the leak check #847
This file contains hidden or 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: ci | |
| on: | |
| push: | |
| branches: | |
| - master | |
| pull_request: | |
| branches: | |
| - master | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }} | |
| cancel-in-progress: true | |
| jobs: | |
| fmt: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-go@v5 | |
| with: | |
| go-version-file: ./go.mod | |
| - run: make fmt | |
| lint: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - run: go version | |
| - uses: actions/setup-go@v5 | |
| with: | |
| go-version-file: ./go.mod | |
| - run: make lint | |
| test: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| # Go's supported releases. The oldest must match the go directive in go.mod. | |
| go-version: ['1.26', '1.27'] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Disable AppArmor | |
| if: runner.os == 'Linux' | |
| run: | | |
| # Disable AppArmor for Ubuntu 23.10+. | |
| # https://chromium.googlesource.com/chromium/src/+/main/docs/security/apparmor-userns-restrictions.md | |
| echo 0 | sudo tee /proc/sys/kernel/apparmor_restrict_unprivileged_userns | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-go@v5 | |
| with: | |
| go-version: ${{ matrix.go-version }} | |
| - run: make test | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: coverage-go${{ matrix.go-version }}.html | |
| path: ./ci/out/coverage.html | |
| bench: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-go@v5 | |
| with: | |
| go-version-file: ./go.mod | |
| - run: make bench |