Skip to content

Commit 286e706

Browse files
committed
Merge the test workflows.
1 parent bd39bd3 commit 286e706

File tree

1 file changed

+18
-47
lines changed

1 file changed

+18
-47
lines changed
+18-47
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Contract tests and checks
1+
name: Tests and Checks
22

33
on:
44
pull_request:
@@ -10,63 +10,34 @@ env:
1010
CARGO_TERM_COLOR: always
1111

1212
jobs:
13-
test_and_check:
14-
name: Test and check
15-
runs-on: ubuntu-latest
16-
13+
rust-lint-and-tests:
14+
runs-on: ubuntu-22.04
15+
strategy:
16+
matrix:
17+
manifest:
18+
- sdk/rust/Cargo.toml
1719
steps:
1820
- name: Cancel Previous Runs
1921
uses: styfle/cancel-workflow-action@0.9.1
2022
with:
2123
access_token: ${{ github.token }}
2224

23-
- name: Checkout sources
25+
- name: Check out source
2426
uses: actions/checkout@v2
25-
- uses: actions/cache@v2
26-
with:
27-
path: |
28-
~/.cargo/bin
29-
~/.cargo/git/checkouts
30-
~/.cargo/git/db
31-
~/.cargo/registry/cache
32-
~/.cargo/registry/index
33-
target
34-
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
3527

36-
- name: Install stable toolchain
28+
- name: Install stable rust toolchain
3729
uses: actions-rs/toolchain@v1
3830
with:
3931
profile: minimal
40-
toolchain: 1.60.0
41-
override: true
42-
components: rustfmt, clippy
43-
44-
- name: Set up Python
45-
uses: actions/setup-python@v2
46-
with:
47-
python-version: 3.9.7
48-
49-
- name: Run tests
50-
uses: actions-rs/cargo@v1
51-
with:
52-
command: test
53-
args: --no-fail-fast --locked
54-
env:
55-
RUST_BACKTRACE: 1
56-
57-
- name: Run cargo clippy
58-
uses: actions-rs/cargo@v1
59-
with:
60-
command: clippy
61-
args: -- -D warnings
62-
63-
- name: Run cargo fmt
64-
uses: actions-rs/cargo@v1
65-
with:
66-
command: fmt
67-
args: --all -- --check
68-
32+
toolchain: stable
33+
components: clippy, rustfmt
34+
default: true
35+
36+
- run: cargo fetch --verbose --locked
37+
- run: cargo check --verbose --workspace --locked --all-targets
38+
- run: cargo test --verbose --workspace --locked --no-fail-fast
39+
- run: cargo clippy --all --all-targets -- -D warnings
40+
- run: cargo fmt --all -- --check
6941
- run: ./bin/generate_schemas.sh
7042
- name: Schema Changes
7143
run: git diff --exit-code
72-

0 commit comments

Comments
 (0)