-
Notifications
You must be signed in to change notification settings - Fork 19
44 lines (44 loc) · 1.13 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
name: Test
on:
pull_request:
branches:
- master
push:
branches:
- master
jobs:
clean-up-actions:
runs-on: ubuntu-latest
steps:
- name: Cancel Previous Runs
# Only cancel non-master branch runs
if: ${{ github.ref != 'refs/heads/master' }}
uses: styfle/cancel-workflow-action@0.11.0
with:
access_token: ${{ github.token }}
test:
runs-on: ubuntu-latest
needs: clean-up-actions
defaults:
run:
working-directory: lib/stable-asset
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Install toolchain
uses: dtolnay/rust-toolchain@nightly
with:
toolchain: nightly-2024-01-15
components: rustfmt
target: wasm32-unknown-unknown
- name: Setup cmake
uses: jwlawson/actions-setup-cmake@v1.13
- name: Check format
run: cargo fmt --all -- --check
- name: Install clippy
run: rustup component add clippy
- name: Run clippy
run: cargo clippy -- -D warnings
- name: Run test
run: cargo test