Files
Inventory/.gitea/workflows/tests.yml

43 lines
1.5 KiB
YAML

name: Tests
on: [push, pull_request]
jobs:
postgres:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:17-alpine
env:
POSTGRES_DB: csr_inventory
POSTGRES_USER: csr_inventory
POSTGRES_PASSWORD: ci-only-password
ports: ["5432:5432"]
options: >-
--health-cmd "pg_isready -U csr_inventory -d csr_inventory"
--health-interval 5s --health-timeout 5s --health-retries 12
env:
DEBUG: "true"
SECURE_SSL_REDIRECT: "false"
POSTGRES_DB: csr_inventory
POSTGRES_USER: csr_inventory
POSTGRES_PASSWORD: ci-only-password
POSTGRES_HOST: localhost
steps:
- uses: https://gitea.com/actions/checkout@v4
- uses: https://gitea.com/actions/setup-python@v5
with:
python-version: "3.13"
- run: pip install -r requirements.txt
- run: python manage.py check
- run: python manage.py makemigrations --check --dry-run
- run: python manage.py test --noinput
- run: python scripts/test_backup_scripts.py
- run: python scripts/test_local_tls.py
- uses: https://gitea.com/actions/setup-node@v4
with:
node-version: "22"
- run: npm install --prefix /tmp/csr-js-tests jsdom@26
- run: node scripts/test_frontend.cjs /tmp/csr-js-tests/node_modules/jsdom
- run: pip install playwright
- run: python -m playwright install --with-deps chromium --only-shell
- run: python scripts/test_browser.py