feat: add ring buffers #2171
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: Test | |
on: | |
push: | |
branches: | |
- master | |
- release/** | |
pull_request: | |
permissions: | |
contents: read | |
defaults: | |
run: | |
shell: bash | |
concurrency: | |
group: test-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
test: | |
name: Module Mode | |
runs-on: ${{ matrix.os }}-latest | |
env: | |
GO111MODULE: "on" | |
GOFLAGS: "-mod=readonly" | |
# The race detector adds considerable runtime overhead. To save time on | |
# pull requests, only run this step for a single job in the matrix. For | |
# all other workflow triggers (e.g., pushes to a release branch) run | |
# this step for the whole matrix. | |
RUN_RACE_TESTS: ${{ github.event_name != 'pull_request' || (matrix.go == '1.24' && matrix.os == 'ubuntu') }} | |
steps: | |
- uses: actions/setup-go@v6 | |
with: | |
go-version: ${{ matrix.go }} | |
- uses: actions/checkout@v5 | |
- uses: actions/cache@v4 | |
with: | |
# In order: | |
# * Module download cache | |
# * Build cache (Linux) | |
# * Build cache (Mac) | |
# * Build cache (Windows) | |
path: | | |
~/go/pkg/mod | |
~/.cache/go-build | |
~/Library/Caches/go-build | |
%LocalAppData%\go-build | |
key: ${{ runner.os }}-go-${{ matrix.go }}-${{ hashFiles('**/go.sum') }} | |
restore-keys: | | |
${{ runner.os }}-go-${{ matrix.go }}- | |
- name: Tidy for min version | |
run: make mod-tidy | |
if: ${{ matrix.go == '1.23' }} | |
- name: Build | |
run: make build | |
- name: Vet | |
run: make vet | |
- name: Test${{ env.RUN_RACE_TESTS == 'true' && ' (with race detection)' || '' }} | |
run: ${{ env.RUN_RACE_TESTS == 'true' && 'make test-race-coverage' || 'make test-coverage' }} | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@5a1091511ad55cbe89839c7260b706298ca349f7 # [email protected] | |
with: | |
directory: .coverage | |
token: ${{ secrets.CODECOV_TOKEN }} | |
timeout-minutes: 15 | |
strategy: | |
matrix: | |
go: ["1.25", "1.24", "1.23"] | |
os: [ubuntu, windows, macos] | |
fail-fast: false |