Skip to content

Commit

Permalink
Run tests from GitHub Actions and Makefile
Browse files Browse the repository at this point in the history
Also remove a redundant branch in the GitHub Actions.
  • Loading branch information
jimnarey committed Mar 13, 2024
1 parent d5bc832 commit e544e2c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
9 changes: 7 additions & 2 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: Django CI

on:
push:
branches: [ main, add-pr-github-actions ]
branches: [ main ]
pull_request:
branches: [ main, add-pr-github-actions ]
branches: [ main ]

jobs:
build:
Expand Down Expand Up @@ -61,3 +61,8 @@ jobs:
with:
build: poetry run ./manage.py migrate --noinput
start: poetry run ./manage.py runserver
- name: Run Unit Tests
env:
DATABASE_URL: postgresql://govuk_domain:govuk_domain@localhost:5432/govuk_domain
run: |
poetry run python manage.py test -v 2
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,6 @@ migrate-devserver:

clear-db:
docker compose down && docker container prune -f && docker volume rm domains-register-a-govuk-domain_postgres-data

test:
docker compose run --rm --service-ports --entrypoint "python manage.py test -v 2" web

0 comments on commit e544e2c

Please sign in to comment.