-
Notifications
You must be signed in to change notification settings - Fork 9
114 lines (108 loc) · 3.09 KB
/
Copy pathtest.yml
File metadata and controls
114 lines (108 loc) · 3.09 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
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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
name: Test
on:
merge_group:
pull_request:
push:
branches: [main]
permissions:
contents: read
packages: read
# If new code is pushed to a PR branch, then cancel in progress workflows for that PR.
# Ensures that we don't waste CI time, and returns results quicker.
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
env:
CARGO_INCREMENTAL: 0
CARGO_TERM_COLOR: always
CARGO_PROFILE_DEV_DEBUG: 1
CARGO_PROFILE_RELEASE_DEBUG: 1
RUST_BACKTRACE: full
CARGO_NET_RETRY: 10
RUSTUP_MAX_RETRIES: 10
jobs:
unit:
name: Unit Tests
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v5
with:
submodules: recursive
- id: filter
uses: dorny/paths-filter@v3
with:
filters: |
code:
- '**/*.rs'
- 'Makefile'
- '**/Cargo.toml'
- '**/Cargo.lock'
- '**/*.sh'
- '*/workflows/test.yml'
- name: Install Protoc
uses: arduino/setup-protoc@v3
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Setup Rust toolchain
uses: actions-rust-lang/setup-rust-toolchain@v1
- name: Install cargo-nextest
uses: taiki-e/install-action@cargo-nextest
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
- name: Run tests
run: |
cargo nextest run \
--workspace \
--all-features \
--no-fail-fast \
--failure-output final \
--filterset 'not package(emerald-mbt)'
if: steps.filter.outputs.code == 'true'
mbt:
name: MBT Suite
runs-on: ubuntu-latest
timeout-minutes: 60
# XXX: Do not block on MBT initially until we gain confidence CI is not
# flaky for any reason.
continue-on-error: true
steps:
- name: Checkout
uses: actions/checkout@v5
with:
submodules: recursive
- id: filter
uses: dorny/paths-filter@v3
with:
filters: |
code:
- '**/*.rs'
- '**/*.qnt'
- 'Makefile'
- '**/Cargo.toml'
- '**/Cargo.lock'
- '**/*.sh'
- '*/workflows/test.yml'
- name: Setup Bun
uses: oven-sh/setup-bun@v2
- name: Install Quint
run: bun install -g @informalsystems/quint
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Install Protoc
uses: arduino/setup-protoc@v3
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Setup Rust toolchain
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: nightly
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
- name: Run MBT suite
run: make mbt-test
if: steps.filter.outputs.code == 'true'