-
Notifications
You must be signed in to change notification settings - Fork 36
59 lines (52 loc) · 1.44 KB
/
node-hub-rust-ci.yml
File metadata and controls
59 lines (52 loc) · 1.44 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
name: Node Hub Rust CI
on:
push:
branches: [main, master]
paths:
- 'node-hub/**'
pull_request:
paths:
- 'node-hub/**'
workflow_dispatch:
jobs:
test-node-hub-crates:
name: Test node-hub Rust crates
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y \
pkg-config \
libasound2-dev \
libpulse-dev \
libwayland-dev \
wayland-protocols \
libxkbcommon-dev \
libgtk-3-dev
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
- name: Cache Cargo
uses: actions/cache@v5
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-node-hub-${{ hashFiles('node-hub/**/Cargo.lock') }}
- name: Run tests for node-hub crates
shell: bash
run: |
set -euo pipefail
shopt -s globstar nullglob
found=0
for manifest in node-hub/**/Cargo.toml; do
found=1
echo "Running tests for $manifest"
cargo test --manifest-path "$manifest" --all-features
done
if [ "$found" = 0 ]; then
echo "No Cargo.toml files found under node-hub/, skipping."
fi