aboutsummaryrefslogtreecommitdiffstats
path: root/.github
diff options
context:
space:
mode:
authorGravatar Sebastiaan Zeeff <[email protected]>2020-11-19 09:33:42 +0100
committerGravatar GitHub <[email protected]>2020-11-19 09:33:42 +0100
commit0e68f822fdf3196a4d9886ca72c6e8fca35f4bf8 (patch)
tree4adfb1abfceb89b8cc94ef3514d9632fd71d110c /.github
parentInsert missing "jobs" yaml tag (diff)
Start database at the beginning of the workflow
The CI was failing on occasion because postgres did not have time enough to start properly before we started running our makemigrations check. I've moved the docker-compose step to earlier in the workflow to give it some time to warm up.
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/lint-test.yaml8
1 files changed, 5 insertions, 3 deletions
diff --git a/.github/workflows/lint-test.yaml b/.github/workflows/lint-test.yaml
index 80305322..668c888d 100644
--- a/.github/workflows/lint-test.yaml
+++ b/.github/workflows/lint-test.yaml
@@ -40,6 +40,11 @@ jobs:
with:
python-version: '3.8'
+ # Start the database early to give it a chance to get ready before
+ # we start running tests.
+ - name: Run database using docker-compose
+ run: docker-compose run -d -p 7777:5432 --name pydis_web postgres
+
# This step caches our Python dependencies. To make sure we
# only restore a cache when the dependencies, the python version,
# the runner operating system, and the dependency location haven't
@@ -92,9 +97,6 @@ jobs:
--format='::error file=%(path)s,line=%(row)d,col=%(col)d::\
[flake8] %(code)s: %(text)s'"
- - name: Run database using docker-compose
- run: docker-compose run -d -p 7777:5432 --name pydis_web postgres
-
- name: Migrations and run tests with coverage.py
run: |
python manage.py makemigrations --check