docker.yml 629 B

1234567891011121314151617181920212223
  1. name: Docker build
  2. on:
  3. push:
  4. pull_request:
  5. concurrency:
  6. group: ${{ github.workflow }}-${{ github.ref }}
  7. cancel-in-progress: true
  8. jobs:
  9. build-container:
  10. runs-on: ubuntu-latest
  11. steps:
  12. - uses: actions/checkout@v4
  13. - name: Build container
  14. run: docker compose build && docker compose pull
  15. - name: Run migrations
  16. run: docker compose run app /venv/bin/python manage.py migrate
  17. - name: Load initial data
  18. run: docker compose run app /venv/bin/python manage.py load_initial_data
  19. - name: Run tests
  20. run: docker compose run app /venv/bin/python manage.py test