-
Notifications
You must be signed in to change notification settings - Fork 0
82 lines (68 loc) · 1.96 KB
/
Copy pathtest-libspot-rs.yaml
File metadata and controls
82 lines (68 loc) · 1.96 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
name: Test libspot-rs (Pure Rust)
on:
push:
branches: [ main, master ]
paths:
- 'crates/libspot-rs/**'
- '.github/workflows/test-libspot-rs.yaml'
pull_request:
branches: [ main, master ]
paths:
- 'crates/libspot-rs/**'
- '.github/workflows/test-libspot-rs.yaml'
workflow_call:
env:
CARGO_TERM_COLOR: always
jobs:
test-libspot-rs:
name: Test libspot-rs (Pure Rust implementation)
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy
- name: Cache cargo registry
uses: actions/cache@v3
with:
path: |
~/.cargo/registry
~/.cargo/git
crates/libspot-rs/target
key: ${{ runner.os }}-libspot-rs-cargo-${{ hashFiles('crates/libspot-rs/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-libspot-rs-cargo-
- name: Check formatting (libspot-rs)
run: |
cd crates/libspot-rs
cargo fmt --all -- --check
- name: Run clippy (libspot-rs)
run: |
cd crates/libspot-rs
cargo clippy --all-targets --all-features -- -D warnings
- name: Build libspot-rs
run: |
cd crates/libspot-rs
cargo build --verbose
- name: Run unit tests (libspot-rs)
run: |
cd crates/libspot-rs
cargo test --lib --verbose
- name: Run integration tests (libspot-rs)
run: |
cd crates/libspot-rs
cargo test --test pure_rust_basic_example --verbose
- name: Run validation tests (libspot-rs)
run: |
cd crates/libspot-rs
cargo test --test pure_rust_validation --verbose
- name: Run doc tests (libspot-rs)
run: |
cd crates/libspot-rs
cargo test --doc --verbose
- name: Run examples (libspot-rs)
run: |
cd crates/libspot-rs
cargo run --example basic