Skip to content

fix: attempt 3 to add multiple files support #44

fix: attempt 3 to add multiple files support

fix: attempt 3 to add multiple files support #44

Workflow file for this run

name: Tests
on: [push, workflow_dispatch]
jobs:
run_tests:
name: Run tests
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Build docker images
run: docker compose -f deploy/docker-compose.test.yaml build --no-cache
- name: Run app in docker
run: docker compose -f deploy/docker-compose.test.yaml up -d
- name: Wait for database startup
run: docker compose -f deploy/docker-compose.test.yaml exec -T adminpanel bash -c "while !</dev/tcp/db/5432; do sleep 1; done;"
timeout-minutes: 1
- name: Migrate database
run: |
docker compose -f deploy/docker-compose.test.yaml exec -T adminpanel python manage.py makemigrations
docker compose -f deploy/docker-compose.test.yaml exec -T adminpanel python manage.py migrate auth
docker compose -f deploy/docker-compose.test.yaml exec -T adminpanel python manage.py migrate
- name: Run tests
run: docker compose -f deploy/docker-compose.test.yaml exec -T adminpanel pytest
# cleanup:
# name: Cleanup test containers
# if: always()
# needs: run_tests
# runs-on: self-hosted
# steps:
# - name: Remove docker containers
# run: docker compose -f deploy/docker-compose.test.yaml down --volumes --rmi all