@@ -10,13 +10,16 @@ jobs:
10
10
environment : test
11
11
steps :
12
12
- name : Checkout code
13
- uses : actions/checkout@v3
13
+ uses : actions/checkout@v4
14
14
- name : Install Rust
15
- uses : actions-rs/ toolchain@v1
15
+ uses : dtolnay/rust- toolchain@stable
16
16
with :
17
17
toolchain : ${{ matrix.rust-toolchain }}
18
- - name : Add wasm32-wasi Rust target
19
- run : rustup target add wasm32-wasi --toolchain ${{ matrix.rust-toolchain }}
18
+ targets : wasm32-wasi
19
+ components : clippy, rustfmt
20
+ - name : Install audit
21
+ run : cargo install cargo-audit
22
+ shell : bash
20
23
- name : Cache cargo registry
21
24
uses : actions/cache@v3
22
25
with :
@@ -32,33 +35,16 @@ jobs:
32
35
with :
33
36
path : target
34
37
key : ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }}
35
- - name : Install fmt
36
- run : rustup component add rustfmt
37
- shell : bash
38
- - name : Install clippy
39
- run : rustup component add clippy
40
- shell : bash
41
- - name : Install audit
42
- run : cargo install cargo-audit
43
- shell : bash
44
- - name : Prepare to store metadata
45
- run : mkdir -p src/well-known
46
- shell : bash
47
- - name : Store JWKS metadata
48
- run : echo "${{ secrets.JWKS_JSON }}" > src/well-known/jwks.json
49
- shell : bash
50
- - name : Store OIDC metadata
51
- run : echo "${{ secrets.OIDC_METADATA_JSON }}" > src/well-known/openid-configuration.json
52
- shell : bash
38
+ - name : Store secrets
39
+ run : |
40
+ echo "${{ secrets.CLIENT_ID }}" > .secrets.client_id
41
+ echo "${{ secrets.CLIENT_SECRET }}" > .secrets.client_secret
42
+ dd if=/dev/random bs=32 count=1 | base64 > .secret.nonce_secret
53
43
- name : Check binaries and format
54
44
run : RUSTFLAGS="--deny warnings" cargo check --bins --target wasm32-wasi && cargo fmt -- --check
55
- shell : bash
56
- - name : clippy
45
+ - name : Run clippy
57
46
run : cargo clippy
58
- shell : bash
59
- - name : audit
47
+ - name : Run audit
60
48
run : cargo audit
61
- shell : bash
62
- - name : build
49
+ - name : Run build
63
50
run : cargo build
64
- shell : bash
0 commit comments