ci: ignore browser-based tests during ci testing

This commit is contained in:
Hang
2026-08-24 00:16:57 +01:00
parent b340719161
commit 73affa94e7
5 changed files with 10 additions and 4 deletions

View File

@@ -48,7 +48,11 @@ jobs:
uv run python3 manage.py makemigrations --check --dry-run uv run python3 manage.py makemigrations --check --dry-run
uv run python3 manage.py collectstatic --noinput uv run python3 manage.py collectstatic --noinput
- name: Run Tests - name: Run Tests
run: uv run pytest --cov run: |
uv run pytest -n auto --cov \
--ignore=RIGS/tests/test_interaction.py \
--ignore=assets/tests/test_interaction.py \
--ignore=training/tests/test_interaction.py
env: env:
DATABASE_ENGINE: sqlite3 DATABASE_ENGINE: sqlite3
DATABASE_NAME: db.sqlite3 DATABASE_NAME: db.sqlite3

1
.gitignore vendored
View File

@@ -112,5 +112,6 @@ screenshots/
nginx/certs/ nginx/certs/
nginx/certbot/ nginx/certbot/
nginx/*.conf
*.pem *.pem
*.key *.key

View File

@@ -48,7 +48,7 @@ INTERNAL_IPS = ['127.0.0.1']
DOMAIN = env('DOMAIN', default='example.com') DOMAIN = env('DOMAIN', default='example.com')
ADMINS = [('IT Manager', f'it@{DOMAIN}'), ('Arona Jones', f'arona.jones@{DOMAIN}')] ADMINS = [('IT Manager', f'it@{DOMAIN}'), ('Hang Xu', f'hang.xu@{DOMAIN}')]
if DEBUG: if DEBUG:
ADMINS.append(('Testing Superuser', 'superuser@example.com')) ADMINS.append(('Testing Superuser', 'superuser@example.com'))

View File

@@ -17,7 +17,7 @@ from django.core import signing
from django.core.exceptions import SuspiciousOperation from django.core.exceptions import SuspiciousOperation
from django.core.mail import EmailMultiAlternatives from django.core.mail import EmailMultiAlternatives
from django.db.models import Q from django.db.models import Q
from django.http import HttpResponse from django.http import HttpResponse, HttpResponseForbidden
from django.shortcuts import get_object_or_404 from django.shortcuts import get_object_or_404
from django.template.loader import get_template from django.template.loader import get_template
from django.urls import reverse from django.urls import reverse

View File

@@ -8,7 +8,7 @@ services:
POSTGRES_PASSWORD: ${DATABASE_PASSWORD} POSTGRES_PASSWORD: ${DATABASE_PASSWORD}
volumes: volumes:
- postgres_data:/var/lib/postgresql/data - postgres_data:/var/lib/postgresql
healthcheck: healthcheck:
test: [ "CMD-SHELL", "pg_isready -U $${POSTGRES_USER} -d $${POSTGRES_DB}" ] test: [ "CMD-SHELL", "pg_isready -U $${POSTGRES_USER} -d $${POSTGRES_DB}" ]
@@ -27,6 +27,7 @@ services:
STAGING: ${STAGING:-false} STAGING: ${STAGING:-false}
SESSION_COOKIE_SECURE_ENABLED: ${SESSION_COOKIE_SECURE_ENABLED:-true} SESSION_COOKIE_SECURE_ENABLED: ${SESSION_COOKIE_SECURE_ENABLED:-true}
CSRF_COOKIE_SECURE_ENABLED: ${CSRF_COOKIE_SECURE_ENABLED:-true} CSRF_COOKIE_SECURE_ENABLED: ${CSRF_COOKIE_SECURE_ENABLED:-true}
FORUM_WEBHOOK_SECRET: ${FORUM_WEBHOOK_SECRET}
DATABASE_ENGINE: ${DATABASE_ENGINE:-postgresql} DATABASE_ENGINE: ${DATABASE_ENGINE:-postgresql}
DATABASE_NAME: ${DATABASE_NAME} DATABASE_NAME: ${DATABASE_NAME}
DATABASE_USERNAME: ${DATABASE_USERNAME} DATABASE_USERNAME: ${DATABASE_USERNAME}