Skip to content

Commit d7d9b4e

Browse files
authored
Merge pull request #1 from HBLL-Collection-Development/add-release-workflows-20260504201956
Add CI release workflows
2 parents 8f5cc4f + c8a2d2c commit d7d9b4e

5 files changed

Lines changed: 172 additions & 0 deletions

File tree

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Accessibility checks
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches: [ main ]
7+
8+
jobs:
9+
accessibility:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v4
13+
- name: Use Node.js
14+
uses: actions/setup-node@v3
15+
with:
16+
node-version: 18
17+
- name: Run frontend accessibility tests
18+
working-directory: src/ui/frontend
19+
run: |
20+
npm ci --prefer-offline --no-audit
21+
npx playwright install --with-deps
22+
npm run test:accessibility

.github/workflows/ci.yml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: ["main", "master"]
6+
pull_request:
7+
8+
jobs:
9+
test:
10+
runs-on: ${{ matrix.os }}
11+
strategy:
12+
matrix:
13+
os: [ubuntu-latest, macos-latest, windows-latest]
14+
python-version: [3.10, 3.11, 3.12, 3.13, 3.14]
15+
steps:
16+
- uses: actions/checkout@v4
17+
18+
- name: Set up Python
19+
uses: actions/setup-python@v4
20+
with:
21+
python-version: ${{ matrix.python-version }}
22+
23+
- name: Cache pip
24+
uses: actions/cache@v4
25+
with:
26+
path: ~/.cache/pip
27+
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
28+
restore-keys: ${{ runner.os }}-pip-
29+
30+
- name: Install dependencies
31+
run: |
32+
python -m pip install --upgrade pip
33+
pip install -r requirements.txt || true
34+
pip install black flake8 mypy pytest || true
35+
36+
- name: Lint: black
37+
run: black --check . || true
38+
39+
- name: Lint: flake8
40+
run: flake8 . || true
41+
42+
- name: Type check
43+
run: mypy src || true
44+
45+
- name: Install Playwright browsers (if Playwright is present)
46+
run: |
47+
python - <<'PY'
48+
import importlib, sys, subprocess
49+
if importlib.util.find_spec('playwright') is None:
50+
print('Playwright not found, skipping browser install')
51+
sys.exit(0)
52+
subprocess.check_call([sys.executable, '-m', 'playwright', 'install', '--with-deps'])
53+
PY
54+
55+
- name: Run tests
56+
run: pytest -q

.github/workflows/e2e.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: E2E Tests
2+
3+
on:
4+
push:
5+
pull_request:
6+
7+
jobs:
8+
e2e:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v4
12+
- name: Set up Python
13+
uses: actions/setup-python@v4
14+
with:
15+
python-version: '3.11'
16+
- name: Install deps
17+
run: |
18+
python -m pip install --upgrade pip
19+
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
20+
pip install pytest playwright
21+
playwright install --with-deps
22+
- name: Run E2E tests
23+
run: |
24+
pytest -q tests/e2e
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Monitoring smoke tests
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
branches: [ main, master ]
7+
schedule:
8+
- cron: '0 * * * *' # hourly
9+
10+
jobs:
11+
smoke-tests:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v4
15+
- name: Set up Python
16+
uses: actions/setup-python@v4
17+
with:
18+
python-version: '3.11'
19+
- name: Install deps
20+
run: |
21+
python -m pip install --upgrade pip
22+
pip install pytest
23+
- name: Run smoke tests
24+
run: |
25+
pytest -q

.github/workflows/release.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
8+
jobs:
9+
build:
10+
runs-on: ${{ matrix.os_runner }}
11+
strategy:
12+
matrix:
13+
platform: [linux, macos, windows]
14+
os_runner: [ubuntu-latest, macos-latest, windows-latest]
15+
steps:
16+
- uses: actions/checkout@v4
17+
18+
- name: Set up Python
19+
uses: actions/setup-python@v4
20+
with:
21+
python-version: '3.11'
22+
23+
- name: Cache pip
24+
uses: actions/cache@v4
25+
with:
26+
path: ~/.cache/pip
27+
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
28+
restore-keys: ${{ runner.os }}-pip-
29+
30+
- name: Build on Linux/Mac
31+
if: matrix.platform != 'windows'
32+
run: |
33+
bash scripts/build_${{ matrix.platform }}.sh
34+
35+
- name: Build on Windows
36+
if: matrix.platform == 'windows'
37+
shell: pwsh
38+
run: |
39+
./scripts/build_windows.ps1
40+
41+
- name: Upload artifacts
42+
uses: actions/upload-artifact@v4
43+
with:
44+
name: release-${{ matrix.platform }}-${{ github.ref_name }}
45+
path: dist/**

0 commit comments

Comments
 (0)