Skip to content

Commit c9d8894

Browse files
committed
uses published workflows
1 parent 798b57e commit c9d8894

2 files changed

Lines changed: 9 additions & 93 deletions

File tree

.github/workflows/rust-audit.yml

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,9 @@ on:
2020
- cron: '0 6 * * 1'
2121

2222
jobs:
23-
cargo-audit:
24-
runs-on: ubuntu-latest
25-
steps:
26-
- uses: actions/checkout@v6
27-
- uses: rustsec/audit-check@v2.0.0
28-
with:
29-
token: ${{ secrets.GITHUB_TOKEN }}
23+
call-workflow:
24+
uses: wookietreiber/workflows/.github/workflows/rust-cargo-audit.yml@main
25+
secrets:
26+
token: ${{ secrets.GITHUB_TOKEN }}
3027

3128
...

.github/workflows/rust.yml

Lines changed: 5 additions & 86 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ on:
1010
- 'rust-toolchain.toml'
1111
- 'Cargo.toml'
1212
- 'Cargo.lock'
13-
- 'src/**'
13+
- '**.rs'
1414
push:
1515
branches:
1616
- main
@@ -21,96 +21,15 @@ on:
2121
- 'rust-toolchain.toml'
2222
- 'Cargo.toml'
2323
- 'Cargo.lock'
24-
- 'src/**'
24+
- '**.rs'
2525

2626
concurrency:
2727
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
2828
cancel-in-progress: true
2929

30-
env:
31-
CARGO_TERM_COLOR: always
32-
CARGO_TERM_VERBOSE: true
33-
3430
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
11534

11635
...

0 commit comments

Comments
 (0)