-
Notifications
You must be signed in to change notification settings - Fork 0
47 lines (39 loc) · 1.01 KB
/
test-code.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
name: Test Code
on:
pull_request:
branches:
- master
push:
branches:
- master
jobs:
test-code:
runs-on: ubuntu-20.04
steps:
- name: Checkout Code
uses: actions/checkout@v2
# Steps taken from https://github.com/actions/cache/blob/master/examples.md#rust---cargo
- name: Cache cargo registry
uses: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
- name: Install toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly-2021-12-01
components: rustfmt, clippy
target: wasm32-unknown-unknown
override: true
default: true
# Enable this for clippy linting.
# - name: Check and Lint Code
# run: cargo +nightly-2021-12-01 clippy -- -D warnings
- name: Check Code
run: cargo check
- name: Test Code
run: cargo test