-
Notifications
You must be signed in to change notification settings - Fork 17
45 lines (42 loc) · 1.17 KB
/
offchain-modules.yml
File metadata and controls
45 lines (42 loc) · 1.17 KB
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
name: offchain-modules-ci
on:
push:
paths:
- .github/workflows/offchain-modules.yml
- 'offchain-modules/**.rs'
- 'offchain-modules/**/Cargo.toml'
- 'offchain-modules/**/Cargo.lock'
pull_request:
paths:
- .github/workflows/offchain-modules.yml
- 'offchain-modules/**.rs'
- 'offchain-modules/**/Cargo.toml'
- 'offchain-modules/**/Cargo.lock'
defaults:
run:
working-directory: offchain-modules
jobs:
offchain-modules-ci:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Cache cargo crate and target
uses: actions/cache@v2
with:
path: |
**/target
~/.cargo/registry
~/.cargo/git
~/.cargo/bin
key: cargo-target-offchain-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
cargo-target-offchain-
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly-2020-10-22
override: true
components: rustfmt, clippy
- run: cargo fmt --all -- --check
- run: cargo clippy -- -D warnings
- run: cargo test -- --nocapture