-
Notifications
You must be signed in to change notification settings - Fork 107
47 lines (39 loc) · 1.38 KB
/
ci-nightly-race.yaml
File metadata and controls
47 lines (39 loc) · 1.38 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
name: CI - Nightly Race Detector
on:
schedule:
- cron: '0 6 * * *' # 06:00 UTC daily
workflow_dispatch: # allow manual trigger
jobs:
race-detector:
runs-on: ubuntu-latest
timeout-minutes: 30
env:
CGO_ENABLED: "1" # Required by -race; explicit for documentation
steps:
- name: Checkout source
uses: actions/checkout@v6
- name: Cache system (apt) dependencies
uses: actions/cache@v4
with:
path: apt-archives
key: ${{ runner.os }}-apt-race-${{ hashFiles('**/.github/workflows/ci-nightly-race.yaml') }}
restore-keys: |
${{ runner.os }}-apt-
- name: Install system dependencies
run: |
mkdir -p apt-archives
sudo cp -a apt-archives /var/cache/apt/archives
sudo apt-get update
sudo apt-get install -y libzmq3-dev pkg-config
cp -a /var/cache/apt/archives/*.deb apt-archives 2>/dev/null || true
- name: Extract Go version from go.mod
run: sed -En 's/^go (.*)$/GO_VERSION=\1/p' go.mod >> "$GITHUB_ENV"
- name: Set up Go with cache
uses: actions/setup-go@v5
with:
go-version: "${{ env.GO_VERSION }}"
cache-dependency-path: ./go.sum
- name: Install dependencies
run: go mod download
- name: Run unit tests with race detector
run: make unit-test-race