-
Notifications
You must be signed in to change notification settings - Fork 4
101 lines (81 loc) · 2.45 KB
/
Copy pathci.yml
File metadata and controls
101 lines (81 loc) · 2.45 KB
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
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
env:
CARGO_TERM_COLOR: always
jobs:
test:
name: Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Rust toolchain
run: |
rustup update stable
rustup default stable
- name: Cache cargo registry & build
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: ${{ runner.os }}-cargo-
- name: Build (workspace)
run: cargo build --workspace
- name: Test (all)
run: cargo test
- name: Clippy (workspace)
run: cargo clippy --workspace -- -D warnings
lib:
name: Library (no default features)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Rust toolchain
run: |
rustup update stable
rustup default stable
- name: Cache cargo registry & build
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-lib-${{ hashFiles('**/Cargo.lock') }}
restore-keys: ${{ runner.os }}-cargo-lib-
- name: Build lib (no default features)
run: cargo build -p authy-cli --lib --no-default-features
- name: Test lib (no default features)
run: cargo test -p authy-cli --lib --no-default-features
- name: Test API (lib integration tests)
run: cargo test --test api
bindings:
name: Check bindings
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Rust toolchain
run: |
rustup update stable
rustup default stable
- name: Cache cargo registry & build
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-bindings-${{ hashFiles('**/Cargo.lock') }}
restore-keys: ${{ runner.os }}-cargo-bindings-
- name: Check Python binding (PyO3)
run: cargo check -p authy-python
- name: Check Node.js binding (napi-rs)
run: cargo check -p authy-node
- name: Clippy bindings
run: cargo clippy -p authy-python -p authy-node -- -D warnings