|
1 | 1 | name: ✅ Checks |
2 | 2 | on: |
3 | | - push: |
4 | | - branches: [ "main" ] |
5 | | - pull_request: |
6 | | - branches: [ "main" ] |
| 3 | + # No long run pushes on main since it will be called by the release workflow |
| 4 | + # push: |
| 5 | + # branches: [ "main" ] |
| 6 | + pull_request: |
| 7 | + branches: ["main"] |
| 8 | + workflow_call: |
7 | 9 |
|
8 | 10 | env: |
9 | | - CARGO_TERM_COLOR: always |
10 | | - RUSTFLAGS: "-C target-cpu=native" |
11 | | - CARGO_INCREMENTAL: 0 |
12 | | - RUST_BACKTRACE: 1 |
| 11 | + CARGO_TERM_COLOR: always |
| 12 | + RUSTFLAGS: "-C target-cpu=native" |
| 13 | + CARGO_INCREMENTAL: 0 |
| 14 | + RUST_BACKTRACE: 1 |
13 | 15 |
|
14 | 16 | jobs: |
15 | | - build_and_test: |
16 | | - runs-on: ubuntu-latest |
17 | | - steps: |
18 | | - - name: 📥 Checkout code |
19 | | - uses: actions/checkout@v4 |
| 17 | + build_and_test: |
| 18 | + runs-on: ubuntu-latest |
| 19 | + steps: |
| 20 | + - name: 📥 Checkout code |
| 21 | + uses: actions/checkout@v4 |
20 | 22 |
|
21 | | - - name: 🦀 Install Rust toolchain |
22 | | - uses: dtolnay/rust-toolchain@nightly |
23 | | - with: |
24 | | - components: clippy, rustfmt |
| 23 | + - name: 🦀 Install Rust toolchain |
| 24 | + uses: dtolnay/rust-toolchain@nightly |
| 25 | + with: |
| 26 | + components: clippy, rustfmt |
25 | 27 |
|
26 | | - - name: 💾 Rust Cache |
27 | | - uses: Swatinem/rust-cache@v2 |
28 | | - with: |
29 | | - shared-key: "build-cache" |
| 28 | + - name: 💾 Rust Cache |
| 29 | + uses: Swatinem/rust-cache@v2 |
| 30 | + with: |
| 31 | + shared-key: "build-cache" |
30 | 32 |
|
31 | | - - name: 🔨 Build |
32 | | - run: cargo build --verbose |
| 33 | + - name: 🔨 Build |
| 34 | + run: cargo build --verbose |
33 | 35 |
|
34 | | - - name: Install latest nextest release |
35 | | - uses: taiki-e/install-action@nextest |
| 36 | + - name: Install latest nextest release |
| 37 | + uses: taiki-e/install-action@nextest |
36 | 38 |
|
37 | | - - name: 🧪 Run tests |
38 | | - uses: actions-rs/cargo@v1 |
39 | | - with: |
40 | | - command: nextest |
41 | | - args: run --nocapture --no-fail-fast |
| 39 | + - name: 🧪 Run tests |
| 40 | + uses: actions-rs/cargo@v1 |
| 41 | + with: |
| 42 | + command: nextest |
| 43 | + args: run --nocapture --no-fail-fast |
42 | 44 |
|
43 | | - lint: |
44 | | - runs-on: ubuntu-latest |
45 | | - steps: |
46 | | - - name: 📥 Checkout code |
47 | | - uses: actions/checkout@v4 |
| 45 | + lint: |
| 46 | + runs-on: ubuntu-latest |
| 47 | + steps: |
| 48 | + - name: 📥 Checkout code |
| 49 | + uses: actions/checkout@v4 |
48 | 50 |
|
49 | | - - name: 🦀 Install Rust toolchain |
50 | | - uses: dtolnay/rust-toolchain@nightly |
51 | | - with: |
52 | | - components: clippy, rustfmt |
| 51 | + - name: 🦀 Install Rust toolchain |
| 52 | + uses: dtolnay/rust-toolchain@nightly |
| 53 | + with: |
| 54 | + components: clippy, rustfmt |
53 | 55 |
|
54 | | - - name: 💾 Rust Cache |
55 | | - uses: Swatinem/rust-cache@v2 |
56 | | - with: |
57 | | - shared-key: "lint-cache" |
| 56 | + - name: 💾 Rust Cache |
| 57 | + uses: Swatinem/rust-cache@v2 |
| 58 | + with: |
| 59 | + shared-key: "lint-cache" |
58 | 60 |
|
59 | | - - name: 🔍 Run linter |
60 | | - run: cargo clippy --all-targets --all-features -- -D warnings |
| 61 | + - name: 🔍 Run linter |
| 62 | + run: cargo clippy --all-targets --all-features -- -D warnings |
61 | 63 |
|
62 | | - - name: 💅 Run format checker |
63 | | - run: cargo fmt --check |
64 | | - |
65 | | - - name: 📖 Run doc linter |
66 | | - run: cargo doc --no-deps --document-private-items |
| 64 | + - name: 💅 Run format checker |
| 65 | + run: cargo fmt --check |
| 66 | + |
| 67 | + - name: 📖 Run doc linter |
| 68 | + run: cargo doc --no-deps --document-private-items |
0 commit comments