name: test on: - push - pull_request permissions: contents: read concurrency: cancel-in-progress: true group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} jobs: test: name: test runs-on: ubuntu-latest steps: - name: Code checkout uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 with: persist-credentials: false - name: Setup Go id: go uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0 with: cache-dependency-path: | go.sum go-version-file: 'go.mod' - run: go version - name: Test run: | go test -v ./... -coverprofile=coverage.txt -covermode=atomic GOARCH=386 go test ./... -coverprofile=coverage.txt -covermode=atomic go test -v ./... -race - name: Publish coverage uses: codecov/codecov-action@e79a6962e0d4c0c17b229090214935d2e33f8354 # v6.0.1 with: token: ${{secrets.CODECOV_TOKEN}} files: ./coverage.txt fail_ci_if_error: false