Skip to content

Commit 6d8caf6

Browse files
authored
ci: add nightly flake workflow (coder#7803)
1 parent 902265b commit 6d8caf6

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed

.github/workflows/nightly-flake.yaml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: nightly-flake
2+
on:
3+
schedule:
4+
# Every day at midnight
5+
- cron: "0 0 * * *"
6+
workflow_dispatch:
7+
push:
8+
paths:
9+
# For testing purposes
10+
# - ".github/workflows/nightly-flake.yaml"
11+
jobs:
12+
test-go-race:
13+
# While GitHub's toaster runners are likelier to flake, we want consistency
14+
# between this environment and the regular test environment for DataDog
15+
# statistics and to only show real workflow threats.
16+
runs-on: "buildjet-8vcpu-ubuntu-2204"
17+
# This runner costs 0.016 USD per minute,
18+
# so 0.016 * 240 = 3.84 USD per run.
19+
timeout-minutes: 240
20+
steps:
21+
- uses: actions/checkout@v3
22+
23+
- uses: ./.github/actions/setup-go
24+
25+
- uses: hashicorp/setup-terraform@v2
26+
with:
27+
terraform_version: 1.1.9
28+
terraform_wrapper: false
29+
30+
- name: Run Tests
31+
run: |
32+
# -race is likeliest to catch flaky tests
33+
# due to correctness detection and its performance
34+
# impact.
35+
gotestsum --junitfile="gotests.xml" -- -timeout=240m -count=10 -race ./...
36+
37+
- uses: ./.github/actions/upload-datadog
38+
if: always()
39+
with:
40+
api-key: ${{ secrets.DATADOG_API_KEY }}

0 commit comments

Comments
 (0)