-
Notifications
You must be signed in to change notification settings - Fork 55
38 lines (33 loc) · 950 Bytes
/
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
name: Cargo Test
on:
workflow_run:
workflows: ["Cargo Check"]
types:
- completed
jobs:
test:
runs-on:
labels: movement-runner
if: ${{ github.event.workflow_run.conclusion == 'success' }}
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
submodules: 'recursive'
- name: Set up Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: 1.70.0
- name: Build and Test Subnet
run: |
cd ./m1
RUSTFLAGS="--cfg tokio_unstable" cargo test --lib # this should only be the lib tests
- name: Update Badge
run: |
if [ $? -eq 0 ]; then
sed -i 's/badge\/tests-[a-zA-Z]*/badge\/tests-Passing-brightgreen/g' README.md
else
sed -i 's/badge\/tests-[a-zA-Z]*/badge\/tests-Failing-red/g' README.md
fi
if: ${{ always() }}