-
Notifications
You must be signed in to change notification settings - Fork 0
86 lines (74 loc) · 2.33 KB
/
Copy pathblitztext-linux-ci.yml
File metadata and controls
86 lines (74 loc) · 2.33 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
name: BlitztextLinux CI
on:
push:
branches: ["**"]
pull_request:
concurrency:
group: blitztext-linux-ci-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
secret-scan:
name: Secret hygiene scan
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v7
- name: Secret hygiene scan
run: |
patterns_file=.github/secret-scan-patterns.txt
if [ ! -f "$patterns_file" ]; then
echo "Missing $patterns_file"
exit 1
fi
pattern="$(grep -vE '^[[:space:]]*(#|$)' "$patterns_file" | paste -sd'|' -)"
if [ -z "$pattern" ]; then
echo "No patterns loaded from $patterns_file"
exit 1
fi
if grep -RInE \
--exclude-dir=.git \
--exclude=secret-scan-patterns.txt \
"$pattern" .; then
echo "Potential secret or private project reference found."
exit 1
fi
test:
name: Tests (Python ${{ matrix.python-version }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.11", "3.12"]
env:
# Qt headless: Offscreen-Plattform, damit GUI-Tests ohne Display laufen.
QT_QPA_PLATFORM: offscreen
steps:
- name: Checkout
uses: actions/checkout@v7
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
cache: pip
cache-dependency-path: requirements-dev.txt
- name: Install Qt offscreen system libraries
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends \
libegl1 libgl1 libxkbcommon0 libdbus-1-3
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -r requirements-dev.txt
- name: Compile-check (Syntax)
run: python -m compileall app
- name: Launch smoke test (App bootet offscreen)
env:
WHISPER_GUI_TESTS: "1"
run: python -m pytest tests/test_smoke_launch.py -v
- name: Run test suite (inkl. GUI offscreen)
env:
WHISPER_GUI_TESTS: "1"
run: python -m pytest tests/ -v