-
Notifications
You must be signed in to change notification settings - Fork 1
94 lines (87 loc) · 2.66 KB
/
Copy pathci.yml
File metadata and controls
94 lines (87 loc) · 2.66 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
name: CI
on:
push:
branches: [master, main]
pull_request:
branches: [master, main]
jobs:
shellcheck:
name: ShellCheck Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install ShellCheck
run: sudo apt-get install -y shellcheck
- name: Run ShellCheck on all Bash scripts
run: |
find . -name '*.sh' -not -path './.git/*' | while read -r script; do
echo "Checking $script..."
shellcheck -x -s bash "$script" || exit 1
done
bash-syntax:
name: Bash Syntax Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Check Bash syntax (bash -n)
run: |
find . -name '*.sh' -not -path './.git/*' | while read -r script; do
echo "Syntax-checking $script..."
bash -n "$script" || exit 1
done
bats-tests:
name: Bats Unit Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Bats
run: |
sudo apt-get install -y bats
- name: Run Bats tests
run: bats tests/*.bats
python-lint:
name: Python Lint (GUI)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install flake8
run: pip install flake8
- name: Lint Python files
run: flake8 gui/ --max-line-length=120 --ignore=E501,W503,E402
python-syntax:
name: Python Syntax Check (GUI)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Compile every GUI module
run: |
set -e
for f in $(find gui -name '*.py'); do
echo "py_compile $f"
python -m py_compile "$f"
done
dbus-introspect-smoke:
name: D-Bus Introspect Smoke
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install D-Bus runtime
run: |
sudo apt-get update
sudo apt-get install -y dbus dbus-x11 python3-dbus python3-gi systemd
- name: Boot a session bus, register the service, introspect
run: |
# The service runs against a private session bus so CI does not
# need root or a real system bus. We only assert that the
# service registers, exposes Ping, GetMonitoringData, and the
# TelemetryUpdated/AudioEnhancementChanged signals.
dbus-run-session -- bash tests/dbus_smoke.sh