48 lines
1.0 KiB
YAML
48 lines
1.0 KiB
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- "**"
|
|
pull_request:
|
|
branches:
|
|
- main
|
|
|
|
jobs:
|
|
test-and-quality:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Setup Python
|
|
uses: actions/setup-python@v5
|
|
with:
|
|
python-version: "3.12"
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
python -m pip install --upgrade pip
|
|
pip install -r requirements.txt
|
|
pip install ruff
|
|
|
|
- name: Lint
|
|
run: ruff check lobby
|
|
|
|
- name: Tests
|
|
run: python manage.py test lobby -v 1
|
|
|
|
- name: Setup Node
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: "22"
|
|
|
|
- name: Install SPA dependencies
|
|
run: |
|
|
npm ci --prefix frontend/angular
|
|
node -e "require('./frontend/angular/node_modules/rollup/dist/native.js')" \
|
|
|| npm install --prefix frontend/angular
|
|
|
|
- name: SPA Angular smoke tests
|
|
run: npm --prefix frontend/angular test
|