-
Notifications
You must be signed in to change notification settings - Fork 45
63 lines (52 loc) · 1.52 KB
/
Copy pathpr-check.yml
File metadata and controls
63 lines (52 loc) · 1.52 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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
name: Pull Request Check
on:
pull_request:
types:
- opened
- synchronize
- closed
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
fmt:
runs-on: ubuntu-latest
container:
image: rust:1.87-slim
steps:
- name: Checkout Sources
uses: actions/checkout@v3
with:
fetch-depth: 1
- name: "[Check] cargo fmt"
run: cargo fmt --check
test-and-clippy:
runs-on: ubuntu-latest
container:
image: paritytech/ci-linux:production
steps:
- name: Checkout Sources
uses: actions/checkout@v3
- name: Fix permissions
run: |
# Fix permission issues with the rustup directory
mkdir -p ~/.cargo ~/.rustup
chown -R $(whoami):$(whoami) ~/.cargo ~/.rustup
- name: Cache build outputs
uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-
- name: Run tests
run: |
RUST_BACKTRACE=1 cargo test --release --features on-chain-release-build -v
- name: Run clippy
run: |
cargo clippy --release --features on-chain-release-build,try-runtime,runtime-benchmarks,evm-tracing