Skip to content

Commit b663cfb

Browse files
authored
Merge pull request #39 from goto-opensource/feature/ci
ci: switch off of deprecated actions-rs actions
2 parents 0ed6249 + cf8cf09 commit b663cfb

File tree

5 files changed

+52
-64
lines changed

5 files changed

+52
-64
lines changed

.github/workflows/audit.yml

-20
This file was deleted.

.github/workflows/build_test.yml

+17-37
Original file line numberDiff line numberDiff line change
@@ -15,68 +15,48 @@ jobs:
1515
matrix:
1616
rust:
1717
- stable
18+
#- stable minus 2 releases
19+
#- beta
1820
feature:
1921
- ring
2022
- openssl
2123
steps:
22-
- uses: actions/checkout@v2
23-
- uses: actions-rs/toolchain@v1
24+
- uses: actions/checkout@v4
25+
- uses: Swatinem/rust-cache@v2
26+
- uses: dtolnay/rust-toolchain@stable
2427
with:
25-
profile: minimal
2628
toolchain: ${{ matrix.rust }}
27-
override: true
28-
- run: rustup component add clippy
29+
components: clippy, rustfmt
2930

30-
- name: check
31-
uses: actions-rs/cargo@v1
32-
with:
33-
command: check
34-
args: --no-default-features --features ${{ matrix.feature }}
31+
- name: check
32+
run: cargo check --no-default-features --features ${{ matrix.feature }}
3533

3634
- name: check (benches)
37-
uses: actions-rs/cargo@v1
38-
with:
39-
command: check
40-
args: --benches --no-default-features --features ${{ matrix.feature }}
35+
run: cargo check --benches --no-default-features --features ${{ matrix.feature }}
4136

4237
- name: check (tests)
43-
uses: actions-rs/cargo@v1
44-
with:
45-
command: check
46-
args: --tests --no-default-features --features ${{ matrix.feature }}
38+
run: cargo check --tests --no-default-features --features ${{ matrix.feature }}
4739

4840
- name: test
49-
uses: actions-rs/cargo@v1
50-
with:
51-
command: test
52-
args: --no-default-features --features ${{ matrix.feature }}
41+
run: cargo test --no-default-features --features ${{ matrix.feature }}
5342

5443
- name: clippy
55-
uses: actions-rs/cargo@v1
56-
with:
57-
command: clippy
58-
args: --all-targets --no-default-features --features ${{ matrix.feature }} -- -Dwarnings
44+
run: cargo clippy --all-targets --no-default-features --features ${{ matrix.feature }} -- -Dwarnings
5945

6046
# test packaging to avoid surprisis at release time
6147
- name: package
62-
uses: actions-rs/cargo@v1
63-
with:
64-
command: package
48+
run: cargo package
6549

6650

6751
build-wasm:
6852
name: build wasm32
6953
runs-on: ubuntu-latest
7054
steps:
71-
- uses: actions/checkout@v2
72-
- uses: actions-rs/toolchain@v1
55+
- uses: actions/checkout@v4
56+
- uses: Swatinem/rust-cache@v2
57+
- uses: dtolnay/rust-toolchain@stable
7358
with:
74-
profile: minimal
7559
toolchain: stable
76-
override: true
7760
target: wasm32-unknown-unknown
7861
- name: build
79-
uses: actions-rs/cargo@v1
80-
with:
81-
command: build
82-
args: --target wasm32-unknown-unknown --features ring
62+
run: cargo build --target wasm32-unknown-unknown --features ring

.github/workflows/ci_cd.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
runs-on: ubuntu-latest
2121
steps:
2222
- name: Checkout repository
23-
uses: actions/checkout@v3
23+
uses: actions/checkout@v4
2424
with:
2525
fetch-depth: 0
2626
- name: Install Rust toolchain

.github/workflows/deny.yml

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Security audit
2+
3+
on:
4+
schedule:
5+
- cron: '0 0 * * 0'
6+
push:
7+
paths:
8+
- '**/Cargo.toml'
9+
- '**/Cargo.lock'
10+
pull_request:
11+
workflow_dispatch:
12+
13+
jobs:
14+
15+
deny-check:
16+
name: cargo-deny check
17+
runs-on: ubuntu-latest
18+
continue-on-error: ${{ matrix.checks == 'advisories' }}
19+
strategy:
20+
matrix:
21+
checks:
22+
- advisories
23+
- bans licenses sources
24+
steps:
25+
- uses: actions/checkout@v4
26+
- uses: EmbarkStudios/cargo-deny-action@v1
27+
with:
28+
command: check ${{ matrix.checks }}

.github/workflows/pull-request.yml

+6-6
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
name: Check Commit Message
1010
runs-on: ubuntu-latest
1111
steps:
12-
- uses: actions/checkout@v3
12+
- uses: actions/checkout@v4
1313
with:
1414
# A PR should not contain too many commits
1515
fetch-depth: 10
@@ -27,16 +27,16 @@ jobs:
2727
name: Rustfmt
2828
runs-on: ubuntu-latest
2929
steps:
30-
- uses: actions/checkout@v3
31-
- uses: actions-rs/toolchain@v1
30+
- uses: actions/checkout@v4
31+
- uses: dtolnay/rust-toolchain@stable
3232
with:
33-
profile: minimal
34-
toolchain: stable
3533
components: rustfmt
34+
- name: cargo-fmt
35+
run: cargo fmt --all --check
3636

3737
cargo-deny:
3838
name: Check licenses
3939
runs-on: ubuntu-latest
4040
steps:
41-
- uses: actions/checkout@v3
41+
- uses: actions/checkout@v4
4242
- uses: EmbarkStudios/cargo-deny-action@v1

0 commit comments

Comments
 (0)