-
Notifications
You must be signed in to change notification settings - Fork 3
121 lines (110 loc) · 3.33 KB
/
rust.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
name: Rust compile & test
concurrency:
group: "${{ github.workflow }}-${{ github.ref }}"
cancel-in-progress: true
on:
push:
branches:
- main
tags:
- '*'
pull_request:
env:
RUST_BACKTRACE: 1
CARGO_TERM_COLOR: always
CARGO_NET_GIT_FETCH_WITH_CLI: true
CARGO_REGISTRIES_CRATES_IO_PROTOCOL: sparse
jobs:
doc:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
rustflags: '-D warnings -W unreachable-pub'
- run: cargo doc --all --no-deps
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
components: rustfmt, clippy
rustflags: ''
target: wasm32-unknown-unknown
- run: cargo fmt --all -- --check
- run: cargo clippy -- -D warnings
- run: cargo clippy --target wasm32-unknown-unknown -- -D warnings
- run: cargo check --tests
- run: cargo check --tests --target wasm32-unknown-unknown
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
rustflags: ''
- run: cargo build --verbose
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
rustflags: ''
- uses: taiki-e/install-action@nextest
- name: "Test rusty-jwt-tools"
run: cargo nextest run --verbose
- name: "Upload test results"
if: startsWith(github.ref, 'refs/tags/')
uses: softprops/action-gh-release@v2
with:
files: target/nextest/default/junit.xml
haskell-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v30
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
rustflags: ''
- name: "Run Haskell test"
run: cd ffi && nix-shell --run 'cargo make hs-test'
wasm-build:
runs-on: ubuntu-latest
strategy:
matrix:
workspace: ["jwt", "acme", "e2e-identity"]
steps:
- uses: actions/checkout@v4
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
rustflags: ''
- name: Install wasm-pack
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
- name: WASM build
run: wasm-pack build --dev --target web ${{ matrix.workspace }}
wasm-test:
runs-on: ubuntu-latest
strategy:
matrix:
workspace: ["jwt", "acme", "e2e-identity"]
steps:
- uses: actions/checkout@v4
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
rustflags: ''
- name: Install wasm-pack
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
- name: Run tests (wasm)
run: wasm-pack test --headless --chrome ${{ matrix.workspace }}
hack:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
rustflags: ''
- uses: taiki-e/install-action@cargo-hack
- name: cargo/hack (verify features compile in isolation)
run: cargo hack check --each-feature --no-dev-deps