mirror of
https://github.com/WGDashboard/WGDashboard-PRW.git
synced 2026-12-01 08:57:40 +00:00
48 lines
1.1 KiB
YAML
48 lines
1.1 KiB
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
pull_request:
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
python:
|
|
name: Python lint and tests
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: actions/setup-python@v5
|
|
with:
|
|
python-version: "3.13"
|
|
- name: Install Python dependencies
|
|
run: |
|
|
python -m pip install --upgrade pip
|
|
python -m pip install -r src/requirements.txt pytest ruff
|
|
- name: Lint Python
|
|
run: ruff check src
|
|
- name: Run Python tests
|
|
run: pytest -q
|
|
|
|
web:
|
|
name: ${{ matrix.app }} lint and tests
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
app: [admin, client]
|
|
defaults:
|
|
run:
|
|
working-directory: src/web/${{ matrix.app }}
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: actions/setup-node@v4
|
|
with:
|
|
node-version: "26"
|
|
cache: npm
|
|
cache-dependency-path: src/web/${{ matrix.app }}/package-lock.json
|
|
- run: npm ci
|
|
- run: npm run lint
|
|
- run: npm test
|