-
Notifications
You must be signed in to change notification settings - Fork 122
63 lines (53 loc) · 1.4 KB
/
contracts.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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
name: Contracts CI - Tests
on:
workflow_dispatch:
pull_request:
paths-ignore:
- 'contracts/**'
- 'docker/**'
push:
paths-ignore:
- 'contracts/**'
- 'docker/**'
branches: [master]
env:
CARGO_TERM_COLOR: always
defaults:
run:
working-directory: contracts
permissions:
contents: write
id-token: write
pages: write
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
all:
name: Tests
runs-on: self-hosted
#container:
# image: ghcr.io/gear-foundation/dapps/ci-rust:1.78.0
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Rust
uses: dtolnay/rust-toolchain@stable
with:
toolchain: nightly
targets: wasm32-unknown-unknown
# mandatory tasks
- name: Fmt
run: 'cargo +nightly fmt --all -- --config imports_granularity=Crate,edition=2021'
- name: Clippy
run: 'cargo +nightly clippy --release --workspace --all-targets --all-features — -D warnings'
# Only on push to master
- name: On Push to master
if: github.ref != 'refs/heads/master'
run: |
cargo test --release --workspace
cargo test --workspace
# Only on push to PR
- name: On Push to Pull Request
if: github.ref != 'refs/heads/master'
run: cargo test --release --workspace