-
Notifications
You must be signed in to change notification settings - Fork 95
65 lines (54 loc) · 1.82 KB
/
test.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
name: "Test all features"
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
workflow_dispatch:
jobs:
test:
runs-on: ubuntu-22.04
steps:
- name: Cancel previous runs
uses: styfle/cancel-workflow-action@b173b6ec0100793626c2d9e6b90435061f4fc3e5 # v0.11.0
with:
access_token: ${{ github.token }}
- name: Install updates and protobuf-compiler
run: sudo apt update && sudo apt install --assume-yes cmake protobuf-compiler
- name: Free space on the runner
run: |
df -h
sudo apt -y autoremove --purge
sudo apt -y autoclean
sudo rm -rf /usr/share/dotnet
sudo rm -rf /opt/ghc
sudo rm -rf "/usr/local/share/boost"
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
df -h
- name: Install stable toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
target: wasm32-unknown-unknown
- name: Install nightly toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly
target: wasm32-unknown-unknown
- name: Checkout
uses: actions/checkout@v3
- name: Fetch cache
uses: Swatinem/rust-cache@a95ba195448af2da9b00fb742d14ffaaf3c21f43 # v2.7.0
with:
shared-key: "fellowship-cache"
- name: Test
run: cargo test --workspace --release --locked -q --features=runtime-metrics,try-runtime
env:
RUSTFLAGS: "-C debug-assertions -D warnings"
- name: Test all features
run: cargo test --workspace --release --locked -q --features=runtime-benchmarks,runtime-metrics,try-runtime
env:
RUSTFLAGS: "-C debug-assertions -D warnings"
SKIP_WASM_BUILD: 1