Files
bbs/.gitea/workflows/tests.yml
T

43 lines
1.0 KiB
YAML

name: Tests
on:
pull_request:
workflow_call:
jobs:
build_frontend:
runs-on: ubuntu-latest
container: node:26-alpine
steps:
- uses: actions/checkout@v4
- name: Build frontend
working-directory: frontend
run: |
npm ci
npm run build
tests:
runs-on: ubuntu-latest
container: nikolaik/python-nodejs:python3.14-nodejs26
steps:
- uses: actions/checkout@v4
# The SPA tests serve the built static/index.html
- name: Build frontend
working-directory: frontend
run: |
npm ci
npm run build
- name: Run migrations
run: uv run --locked manage.py migrate
- name: Run Django checks
run: uv run manage.py check
- name: Run tests with coverage
run: uv run pytest -v --cov bbs --cov-report term --cov-report xml:coverage.xml
- name: Upload coverage reports
uses: actions/upload-artifact@v3
with:
name: coverage-report
path: coverage.xml