You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
watchtower/.github/workflows/race.yml

38 lines
788 B
YAML

name: Race Detector
on:
workflow_dispatch: {}
pull_request:
branches:
- main
jobs:
race:
name: Run tests with race detector
runs-on: ubuntu-latest
strategy:
matrix:
go-version: [1.20.x]
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go-version }}
- name: Install build tools (for cgo / race detector)
run: |
sudo apt-get update
sudo apt-get install -y build-essential
- name: Ensure CGO enabled
run: echo "CGO_ENABLED=1" >> $GITHUB_ENV
- name: Run tests with race detector
run: |
go test -race ./... -v