File tree Expand file tree Collapse file tree 3 files changed +104
-0
lines changed
Expand file tree Collapse file tree 3 files changed +104
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Format
2+
3+ on :
4+ push :
5+ branches :
6+ - main
7+ - ens/sdk-2105-skeleton
8+ pull_request :
9+
10+ jobs :
11+ format :
12+ name : fmt:required
13+ runs-on : ubuntu-latest
14+
15+ steps :
16+ - uses : actions/checkout@v4
17+
18+ - name : Install Rust toolchain from rust-toolchain.toml
19+ run : rustup show
20+
21+ - name : Check formatting
22+ run : cargo fmt --all -- --check
23+
Original file line number Diff line number Diff line change 1+ name : Lint
2+
3+ on :
4+ push :
5+ branches :
6+ - main
7+ - ens/sdk-2105-skeleton
8+ pull_request :
9+
10+ jobs :
11+ lint :
12+ name : lint:required
13+ runs-on : ubuntu-latest
14+
15+ steps :
16+ - uses : actions/checkout@v4
17+
18+ - name : Show Rust toolchain
19+ run : rustup show
20+
21+ - name : Cache Cargo
22+ uses : actions/cache@v4
23+ with :
24+ path : |
25+ ~/.cargo/registry
26+ ~/.cargo/git
27+ target
28+ key : ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}-lint-1
29+
30+ - name : Run Lint
31+ run : cargo clippy --verbose --tests --benches -- -D warnings
32+ env :
33+ RUST_BACKTRACE : 1
Original file line number Diff line number Diff line change 1+ name : Test
2+
3+ on :
4+ push :
5+ branches :
6+ - main
7+ - ens/sdk-2105-skeleton
8+ pull_request :
9+
10+ jobs :
11+ test :
12+ name : ${{ matrix.test }} on ${{ matrix.os }}
13+ runs-on : ${{ matrix.os }}
14+ strategy :
15+ fail-fast : false
16+ matrix :
17+ os : [ubuntu-latest, macos-latest]
18+ test :
19+ - name : hello_tests
20+ package : icp-cli
21+
22+ steps :
23+ - uses : actions/checkout@v4
24+
25+ - name : Show Rust toolchain version
26+ run : rustup show
27+
28+ - uses : actions/cache@v4
29+ with :
30+ path : |
31+ ~/.cargo/registry
32+ ~/.cargo/git
33+ target
34+ key : ${{ matrix.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}-test-1
35+
36+ - name : Run ${{ matrix.test }}
37+ run : cargo test --package ${{ matrix.test.package }} --test ${{ matrix.test.name }}
38+
39+
40+ aggregate :
41+ name : test:required
42+ if : ${{ always() }}
43+ runs-on : ubuntu-latest
44+ needs : [test]
45+ steps :
46+ - name : check result
47+ if : ${{ needs.test.result != 'success' }}
48+ run : exit 1
You can’t perform that action at this time.
0 commit comments