Skip to content

Fix one remaining formatting issue #86

Fix one remaining formatting issue

Fix one remaining formatting issue #86

Workflow file for this run

name: Tests
on: [push, pull_request]
jobs:
tests:
env:
FORCE_COLOR: "1"
PRE_COMMIT_COLOR: "always"
strategy:
fail-fast: false
name: "Integration testing"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
path: cookiecutter-django-package
- uses: actions/[email protected]
with:
python-version: 3.12
- name: Install tools using pip
working-directory: cookiecutter-django-package
run: |
pip install --constraint=.github/workflows/constraints.txt pip
pip install --constraint=.github/workflows/constraints.txt cookiecutter nox nox-poetry poetry
- name: Generate project using Cookiecutter
run: cookiecutter --no-input cookiecutter-django-package
- name: "Set up environment"
run: |
docker compose build --build-arg MULTIPLE_PYTHON=True
docker compose up -d
working-directory: cookiecutter-django-package-instance
- name: Create git repository
run: |
docker compose exec django_test git init
docker compose exec django_test git config --local user.name "GitHub Action"
docker compose exec django_test git config --local user.email "[email protected]"
docker compose exec django_test git add .
docker compose exec django_test git commit --message="Initial import"
working-directory: cookiecutter-django-package-instance
- name: "Wait for docker to finish building"
run: sleep 10
- name: "Run tests"
run: docker compose exec django_test nox -r --force-color
working-directory: cookiecutter-django-package-instance
- name: Combine coverage data and display human readable report
run: |
docker compose exec django_test nox --session "coverage(django='5.0')"
working-directory: cookiecutter-django-package-instance
- name: Create coverage report and copy to artifacts
run: |
docker compose exec django_test nox --session "coverage(django='5.0')" -- xml
docker compose exec django_test cat coverage.xml > coverage.xml
working-directory: cookiecutter-django-package-instance
- name: Upload coverage report
uses: codecov/codecov-action@v4
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
working-directory: cookiecutter-django-package-instance
- name: "Shut down environment"
run: docker compose down
working-directory: cookiecutter-django-package-instance