|
10 | 10 | - 'rust-toolchain.toml' |
11 | 11 | - 'Cargo.toml' |
12 | 12 | - 'Cargo.lock' |
13 | | - - 'src/**' |
| 13 | + - '**.rs' |
14 | 14 | push: |
15 | 15 | branches: |
16 | 16 | - main |
|
21 | 21 | - 'rust-toolchain.toml' |
22 | 22 | - 'Cargo.toml' |
23 | 23 | - 'Cargo.lock' |
24 | | - - 'src/**' |
| 24 | + - '**.rs' |
25 | 25 |
|
26 | 26 | concurrency: |
27 | 27 | group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} |
28 | 28 | cancel-in-progress: true |
29 | 29 |
|
30 | | -env: |
31 | | - CARGO_TERM_COLOR: always |
32 | | - CARGO_TERM_VERBOSE: true |
33 | | - |
34 | 30 | jobs: |
35 | | - |
36 | | - check: |
37 | | - name: cargo fmt --check and clippy |
38 | | - runs-on: ubuntu-latest |
39 | | - |
40 | | - steps: |
41 | | - |
42 | | - - name: checkout |
43 | | - uses: actions/checkout@v6 |
44 | | - |
45 | | - - name: set up rust toolchain |
46 | | - uses: actions-rust-lang/setup-rust-toolchain@v1 |
47 | | - with: |
48 | | - components: clippy, rustfmt |
49 | | - rustflags: '' |
50 | | - |
51 | | - - name: check formatting |
52 | | - run: cargo fmt --check |
53 | | - |
54 | | - - name: cargo clippy |
55 | | - run: cargo clippy |
56 | | - |
57 | | - msrv: |
58 | | - name: msrv |
59 | | - runs-on: ubuntu-latest |
60 | | - |
61 | | - outputs: |
62 | | - msrv: ${{ steps.msrv.outputs.msrv }} |
63 | | - |
64 | | - steps: |
65 | | - |
66 | | - - name: checkout |
67 | | - uses: actions/checkout@v6 |
68 | | - |
69 | | - - name: install cargo-msrv |
70 | | - uses: taiki-e/install-action@v2 |
71 | | - with: |
72 | | - tool: cargo-msrv |
73 | | - |
74 | | - - name: show cargo-msrv version |
75 | | - run: cargo msrv --version |
76 | | - |
77 | | - - name: get msrv |
78 | | - run: | |
79 | | - msrv=$(cargo msrv show --output-format minimal) |
80 | | - echo "msrv=$msrv" >> "$GITHUB_OUTPUT" |
81 | | - id: msrv |
82 | | - |
83 | | - - name: show msrv |
84 | | - run: echo ${{ steps.msrv.outputs.msrv }} |
85 | | - |
86 | | - test: |
87 | | - name: cargo check, build and test |
88 | | - runs-on: ubuntu-latest |
89 | | - needs: msrv |
90 | | - |
91 | | - strategy: |
92 | | - matrix: |
93 | | - toolchain: |
94 | | - - null # this will use rust-toolchain.toml |
95 | | - - ${{ needs.msrv.outputs.msrv }} |
96 | | - |
97 | | - steps: |
98 | | - |
99 | | - - name: checkout |
100 | | - uses: actions/checkout@v6 |
101 | | - |
102 | | - - name: set up rust toolchain |
103 | | - uses: actions-rust-lang/setup-rust-toolchain@v1 |
104 | | - with: |
105 | | - toolchain: ${{ matrix.toolchain }} |
106 | | - |
107 | | - - name: cargo check |
108 | | - run: cargo check |
109 | | - |
110 | | - - name: cargo build |
111 | | - run: cargo build |
112 | | - |
113 | | - - name: cargo test |
114 | | - run: cargo test |
| 31 | + call-workflow: |
| 32 | + name: rust |
| 33 | + uses: wookietreiber/workflows/.github/workflows/rust.yml@main |
115 | 34 |
|
116 | 35 | ... |
0 commit comments