-
Notifications
You must be signed in to change notification settings - Fork 3
50 lines (40 loc) · 1.2 KB
/
test.yaml
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
name: Test
on:
pull_request:
push:
branches:
- main
- releases/**
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
test:
name: Test Suite
runs-on: blacksmith-4vcpu-ubuntu-2204
steps:
- uses: actions/checkout@v4
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@master
with:
toolchain: 1.81.0
- name: Rust Cache
uses: useblacksmith/rust-cache@v3.0.1
with:
shared-key: "cache-test"
- name: Run tests for contracts
run: for C in contracts/*; do cd $C; RUSTFLAGS="-D warnings" cargo test --locked; cd ../../ ; done
env:
RUST_BACKTRACE: 1
- name: Run tests for packages
run: for C in packages/*; do cd $C; RUSTFLAGS="-D warnings" cargo test --locked; cd ../../ ; done
env:
RUST_BACKTRACE: 1
- name: Remove all golden files
run: find . -name "*.golden" -exec rm -rf {} \;
- name: Regenerate golden files
run: RUSTFLAGS="-D warnings" cargo test --locked
env:
GOLDIE_UPDATE: 1
- name: Check for stale golden files
run: git diff --exit-code