make app installable + reorganize code + update requirements #718
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Test | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
cancel-in-progress: true | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
tests: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: tests | |
env: | |
DOCKER_BUILDKIT: 1 | |
COMPOSE_DOCKER_CLI_BUILD: 1 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Login to DockerHub | |
if: github.repository == 'opengisch/django_oapif_tests-ogcapif' | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Setup Compose | |
run: | | |
# start the stack | |
docker compose --profile testing_integration up --build -d | |
# migrate database | |
docker compose exec django python manage.py migrate --no-input | |
docker compose exec django python manage.py populate_users | |
docker compose exec django python manage.py populate_data | |
- name: Run unit tests | |
run: docker compose exec django_oapif_tests python manage.py test | |
- name: Run integration tests | |
run: docker compose run integration_tests | |
- name: Failure logs | |
if: failure() | |
run: docker-compose logs |