40 lines
1.3 KiB
YAML
40 lines
1.3 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
|