|
6 | 6 | pull_request: |
7 | 7 | branches: [ master, main, develop ] |
8 | 8 |
|
9 | | -env: |
10 | | - CARGO_TERM_COLOR: always |
11 | | - RUST_BACKTRACE: 1 |
12 | | - |
13 | 9 | jobs: |
14 | | - check: |
15 | | - name: Check |
16 | | - runs-on: ubuntu-latest |
17 | | - steps: |
18 | | - - uses: actions/checkout@v4 |
19 | | - |
20 | | - - name: Install Rust |
21 | | - uses: dtolnay/rust-toolchain@1.95.0 |
22 | | - with: |
23 | | - components: rustfmt, clippy |
24 | | - |
25 | | - - name: Cache dependencies |
26 | | - uses: actions/cache@v4 |
27 | | - with: |
28 | | - path: | |
29 | | - ~/.cargo/registry |
30 | | - ~/.cargo/git |
31 | | - target |
32 | | - key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} |
33 | | - restore-keys: | |
34 | | - ${{ runner.os }}-cargo- |
35 | | -
|
36 | | - - name: Run cargo check |
37 | | - run: cargo check --all-targets --all-features |
38 | | - |
39 | | - fmt: |
40 | | - name: Rustfmt |
41 | | - runs-on: ubuntu-latest |
42 | | - steps: |
43 | | - - uses: actions/checkout@v4 |
44 | | - |
45 | | - - name: Install Rust |
46 | | - uses: dtolnay/rust-toolchain@1.95.0 |
47 | | - with: |
48 | | - components: rustfmt |
49 | | - |
50 | | - - name: Run cargo fmt |
51 | | - run: cargo fmt --all -- --check |
52 | | - |
53 | | - clippy: |
54 | | - name: Clippy |
55 | | - runs-on: ubuntu-latest |
56 | | - steps: |
57 | | - - uses: actions/checkout@v4 |
58 | | - |
59 | | - - name: Install Rust |
60 | | - uses: dtolnay/rust-toolchain@1.95.0 |
61 | | - with: |
62 | | - components: clippy |
63 | | - |
64 | | - - name: Cache dependencies |
65 | | - uses: actions/cache@v4 |
66 | | - with: |
67 | | - path: | |
68 | | - ~/.cargo/registry |
69 | | - ~/.cargo/git |
70 | | - target |
71 | | - key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} |
72 | | - restore-keys: | |
73 | | - ${{ runner.os }}-cargo- |
74 | | -
|
75 | | - - name: Run cargo clippy |
76 | | - run: cargo clippy --all-targets --all-features -- -D warnings |
77 | | - |
78 | | - test: |
79 | | - name: Test Suite |
80 | | - runs-on: ${{ matrix.os }} |
81 | | - strategy: |
82 | | - matrix: |
83 | | - os: [ubuntu-latest, windows-latest, macos-latest] |
84 | | - rust: [1.95.0] |
85 | | - include: |
86 | | - - os: ubuntu-latest |
87 | | - rust: beta |
88 | | - - os: ubuntu-latest |
89 | | - rust: nightly |
90 | | - continue-on-error: ${{ matrix.rust == 'nightly' }} |
91 | | - |
92 | | - steps: |
93 | | - - uses: actions/checkout@v4 |
94 | | - |
95 | | - - name: Install Rust |
96 | | - uses: dtolnay/rust-toolchain@master |
97 | | - with: |
98 | | - toolchain: ${{ matrix.rust }} |
99 | | - |
100 | | - - name: Cache dependencies |
101 | | - uses: actions/cache@v4 |
102 | | - with: |
103 | | - path: | |
104 | | - ~/.cargo/registry |
105 | | - ~/.cargo/git |
106 | | - target |
107 | | - key: ${{ runner.os }}-${{ matrix.rust }}-cargo-${{ hashFiles('**/Cargo.lock') }} |
108 | | - restore-keys: | |
109 | | - ${{ runner.os }}-${{ matrix.rust }}-cargo- |
110 | | - ${{ runner.os }}-cargo- |
111 | | -
|
112 | | - - name: Run tests |
113 | | - run: cargo test --verbose |
| 10 | + rust: |
| 11 | + name: Rust CI |
| 12 | + uses: muvon/ci-workflow/.github/workflows/rust-ci.yml@master |
| 13 | + with: |
| 14 | + feature-flags: '--all-features' |
| 15 | + doc: false |
| 16 | + coverage: false |
114 | 17 |
|
115 | 18 | musl-build: |
116 | 19 | name: Musl Build (x86_64 + aarch64) |
@@ -138,21 +41,6 @@ jobs: |
138 | 41 | cargo build --target ${{ matrix.target }} |
139 | 42 | " |
140 | 43 |
|
141 | | - security: |
142 | | - name: Security Audit |
143 | | - runs-on: ubuntu-latest |
144 | | - steps: |
145 | | - - uses: actions/checkout@v4 |
146 | | - |
147 | | - - name: Install Rust |
148 | | - uses: dtolnay/rust-toolchain@1.95.0 |
149 | | - |
150 | | - - name: Install cargo-audit |
151 | | - run: cargo install cargo-audit --locked |
152 | | - |
153 | | - - name: Run security audit |
154 | | - run: cargo audit |
155 | | - |
156 | 44 | brief: |
157 | 45 | uses: muvon/ci-workflow/.github/workflows/brief.yml@master |
158 | 46 | secrets: inherit |
0 commit comments