-
Notifications
You must be signed in to change notification settings - Fork 160
81 lines (77 loc) · 2.32 KB
/
unit-tests.yml
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
name: Unit tests
# Cancel workflow if there is a new change to the branch.
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
on:
workflow_dispatch:
merge_group:
pull_request:
branches:
- main
# This needs to be declared explicitly so that the job is actually
# run when moved out of draft.
types: [opened, synchronize, reopened, ready_for_review]
paths-ignore:
- 'docs/'
push:
branches:
- main
paths-ignore:
- 'docs/'
schedule:
- cron: "0 0 * * *"
env:
CI: 1
CARGO_INCREMENTAL: 0
CACHE_TIMEOUT_MINUTES: 5
RUSTC_WRAPPER: "sccache"
CC: "sccache clang"
CXX: "sccache clang++"
jobs:
tests:
# Change to `buildjet-8vcpu-ubuntu-2204` if `fuzzy` is down.
# runs-on: fuzzy
runs-on: buildjet-8vcpu-ubuntu-2204
# Run the job only if the PR is not a draft.
# This is done to limit the runner cost.
if: github.event.pull_request.draft == false
timeout-minutes: 30
steps:
- name: Checkout Sources
uses: actions/checkout@v4
- name: Setup sccache
uses: mozilla-actions/[email protected]
timeout-minutes: ${{ fromJSON(env.CACHE_TIMEOUT_MINUTES) }}
continue-on-error: true
- uses: actions/setup-go@v5
with:
go-version-file: "go.work"
- name: install nextest
uses: taiki-e/install-action@nextest
- run: make test
tests-release:
# Change to `buildjet-8vcpu-ubuntu-2204` if `fuzzy` is down.
# runs-on: fuzzy
runs-on: buildjet-8vcpu-ubuntu-2204
# Run the job only if the PR is not a draft.
# This is done to limit the runner cost.
if: github.event.pull_request.draft == false
timeout-minutes: 30
steps:
# find the nearest S3 space for storing cache files
- name: Show IP
run: curl ifconfig.me
continue-on-error: true
- name: Checkout Sources
uses: actions/checkout@v4
- name: Setup sccache
uses: mozilla-actions/[email protected]
timeout-minutes: ${{ fromJSON(env.CACHE_TIMEOUT_MINUTES) }}
continue-on-error: true
- uses: actions/setup-go@v5
with:
go-version-file: "go.work"
- name: install nextest
uses: taiki-e/install-action@nextest
- run: make test-release