fix(fxgcppubsub): Fixed race conditions on avro binary codec cache (#20) #26
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: coverage | |
on: | |
push: | |
branches: | |
- main | |
permissions: | |
contents: write | |
pull-requests: write | |
jobs: | |
coverage: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
module: | |
- "fxgcppubsub" | |
- "fxgomysqlserver" | |
- "fxslack" | |
- "fxredis" | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 1 | |
- name: Install Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: "1.22" | |
check-latest: true | |
- name: Install dependencies for module ${{ matrix.module }} | |
working-directory: ${{ matrix.module }} | |
run: go mod download | |
- name: Run tests for module ${{ matrix.module }} | |
working-directory: ${{ matrix.module }} | |
run: go test -v -race -failfast -coverpkg=./... -covermode=atomic -coverprofile=coverage.tmp.out ./... | |
- name: Exclude testdata | |
working-directory: ${{ matrix.module}} | |
run: cat coverage.tmp.out | grep -v "testdata" > coverage.out | |
- name: Clean temp coverage | |
working-directory: ${{ matrix.module }} | |
run: rm coverage.tmp.out | |
- name: Codecov for module ${{ matrix.module }} | |
uses: codecov/codecov-action@v3 | |
with: | |
fail_ci_if_error: false | |
flags: ${{ matrix.module }} | |
env: | |
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} |