Race detector - dev #491
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: Race Detector | |
| run-name: Race detector - ${{ github.ref_name }} | |
| "on": | |
| push: | |
| branches: | |
| - main | |
| - dev | |
| pull_request: {} | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: true | |
| defaults: | |
| run: | |
| shell: bash | |
| jobs: | |
| race: | |
| name: Go race detector | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 30 | |
| env: | |
| CGO_ENABLED: "1" | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 | |
| with: | |
| persist-credentials: false | |
| - name: Setup Go | |
| uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e | |
| with: | |
| go-version-file: go.mod | |
| cache: true | |
| cache-dependency-path: | | |
| go.sum | |
| **/go.sum | |
| - name: Show Go environment | |
| run: | | |
| go version | |
| go env GOTOOLCHAIN CGO_ENABLED GOOS GOARCH | |
| - name: Download dependencies | |
| run: go mod download | |
| - name: Run race detector | |
| run: go test -race -count=1 ./... |