Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: Depot runners for unit tests (WIP) #3447

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/api-merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ defaults:

jobs:
test:
runs-on: General-Purpose-8c-Runner
runs-on: depot-ubuntu-22.04-16
name: API Unit Tests

services:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/api-pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ defaults:

jobs:
test:
runs-on: General-Purpose-8c-Runner
runs-on: depot-ubuntu-22.04-16
name: API Unit Tests

services:
Expand Down
3 changes: 1 addition & 2 deletions api/.env-ci
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
DATABASE_URL=postgresql://postgres:postgres@localhost:5432/postgres
ANALYTICS_DATABASE_URL=postgres://postgres:postgres@localhost:5432/analytics
PYTEST_ADDOPTS=--cov . --cov-report xml -n auto --dist worksteal

PYTEST_ADDOPTS=--cov . --cov-report xml -n 16 --dist worksteal
12 changes: 4 additions & 8 deletions api/tests/unit/users/test_unit_users_signals.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,10 @@


@pytest.mark.django_db
def test_warn_insecure_emits_a_warning_when_no_user_exists(recwarn, django_user_model):
# When
warn_insecure(django_user_model)

# Then
assert len(recwarn) == 1
w = recwarn.pop()
assert issubclass(w.category, RuntimeWarning)
def test_warn_insecure_emits_a_warning_when_no_user_exists(django_user_model):
# When & Then
with pytest.warns(RuntimeWarning):
warn_insecure(django_user_model)


@pytest.mark.django_db
Expand Down