Enable race conditions detector #259
Workflow file for this run
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: Code Check | |
on: | |
workflow_dispatch: | |
pull_request: | |
types: | |
- opened | |
- synchronize | |
- reopened | |
jobs: | |
build: | |
name: Build And Test Go code | |
runs-on: ubuntu-latest | |
steps: | |
- name: Setup Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: '1.20' | |
- name: Check out code into the Go module directory | |
uses: actions/checkout@v4 | |
# https://stackoverflow.com/questions/76269119/github-actions-go-lambda-project-different-sha256sums | |
- name: Build | |
run: go build -v -buildvcs=false ./... | |
env: | |
# Make sure to not use dependencies that rely on CGO | |
CGO_ENABLED: 0 | |
# Make sure to detect eventual race conditions | |
# (CGO must be enabled to use -race detector) | |
- name: Test | |
run: go test -race -p 1 -v -shuffle=on ./... | |
- name: Linter | |
uses: golangci/golangci-lint-action@v6 | |
with: | |
version: latest | |
env: | |
GOFLAGS: "-buildvcs=false" |