-
Notifications
You must be signed in to change notification settings - Fork 1
85 lines (80 loc) · 2 KB
/
test.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
name: Test
on:
push:
branches-ignore:
- draft-release
jobs:
test-lang:
name: Test Lang
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Load cache
uses: actions/cache@v3
with:
path: ./.cargo
key: test-lang-cargo-${{ hashFiles('./Cargo.lock') }}
restore-keys: test-lang-cargo-
- name: Test
run: make test/lang
test-cli:
name: Test CLI
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Load cache
uses: actions/cache@v3
with:
path: ./.cargo
key: test-cli-cargo-${{ hashFiles('./Cargo.lock') }}
restore-keys: test-cli-cargo-
- name: Test
run: make test/cli
test-wasm:
name: Test WebAssembly
runs-on: ubuntu-22.04
env:
CARGO_TERM_COLOR: always
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: 1.70.0
target: wasm32-unknown-unknown
override: true
- name: Load Rust cache
uses: Swatinem/rust-cache@v2
- name: Install wasm-pack
uses: jetli/[email protected]
with:
version: v0.11.0
- name: Install Node
uses: actions/setup-node@v3
with:
node-version: 18.16.0
- name: Test
run: make test/wasm
update-draft-release-branch:
needs:
- test-lang
- test-cli
- test-wasm
if: github.ref == 'refs/heads/main'
name: Update draft release branch
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v3
with:
persist-credentials: false
- name: Update
uses: alice-biometrics/[email protected]
with:
branch: draft-release
force: true
github_token: ${{ secrets.RELEASE_TOKEN }}