mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2025-08-09 22:44:54 +03:00
Update ci.yml to only build images relevant for running pytest
In order to run pytest we can constrain the build command to only build the images related to the django service. This mainly prevents the docs image from being built unnecessarily. This cuts run time of the Github Actions workflow from approx. 4min 30s to below 3min.
This commit is contained in:
parent
bf9a861ddc
commit
240b8805dd
|
@ -36,7 +36,7 @@ jobs:
|
||||||
- name: Run pre-commit
|
- name: Run pre-commit
|
||||||
uses: pre-commit/action@v3.0.0
|
uses: pre-commit/action@v3.0.0
|
||||||
|
|
||||||
# With no caching at all the entire ci process takes 4m 30s to complete!
|
# With no caching at all the entire ci process takes 3m to complete!
|
||||||
pytest:
|
pytest:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
{%- if cookiecutter.use_docker == 'n' %}
|
{%- if cookiecutter.use_docker == 'n' %}
|
||||||
|
@ -69,7 +69,7 @@ jobs:
|
||||||
{%- if cookiecutter.use_docker == 'y' %}
|
{%- if cookiecutter.use_docker == 'y' %}
|
||||||
|
|
||||||
- name: Build the Stack
|
- name: Build the Stack
|
||||||
run: docker compose -f local.yml build
|
run: docker compose -f local.yml build django
|
||||||
|
|
||||||
- name: Run DB Migrations
|
- name: Run DB Migrations
|
||||||
run: docker compose -f local.yml run --rm django python manage.py migrate
|
run: docker compose -f local.yml run --rm django python manage.py migrate
|
||||||
|
|
Loading…
Reference in New Issue
Block a user