@@ -24,24 +24,25 @@ jobs:
2424 - name : Code style
2525 working-directory : ./mapswipe_workers
2626 run : |
27- black --check mapswipe_workers
28- flake8 --count --config setup.cfg mapswipe_workers/
29- isort --check --settings-file setup.cfg mapswipe_workers/
27+ black --check mapswipe_workers ../django
28+ flake8 --count --config setup.cfg mapswipe_workers/ ../django/
29+ isort --check --settings-file setup.cfg mapswipe_workers/ ../django/
3030 - name : Setup Postgres Database Container
3131 env :
32- POSTGRES_PASSWORD : test
33- POSTGRES_USER : test
34- POSTGRES_DB : test
32+ POSTGRES_PASSWORD : postgres
33+ POSTGRES_USER : postgres
34+ POSTGRES_DB : postgres
3535 run : |
3636 # Create a mock file for wal-g setup
3737 touch postgres/serviceAccountKey.json
3838 docker-compose up --build --detach postgres
39+ for i in {1..5}; do docker-compose exec -T postgres pg_isready && s=0 && break || s=$? && sleep 5; done; (docker-compose logs postgres && exit $s)
3940 - name : Deploy Firebase Rules and Functions
4041 env :
4142 FIREBASE_TOKEN : ${{ secrets.FIREBASE_TOKEN }}
4243 FIREBASE_DB : ${{ secrets.FIREBASE_DB }}
4344 run : |
44- docker-compose run firebase_deploy sh -c "firebase use $FIREBASE_DB && firebase deploy --token $FIREBASE_TOKEN --only database:rules "
45+ docker-compose run --rm firebase_deploy sh -c "firebase use $FIREBASE_DB && firebase deploy --token $FIREBASE_TOKEN --only database"
4546 - name : Decrypt Service Account Key File
4647 working-directory : ./
4748 run : |
@@ -55,10 +56,12 @@ jobs:
5556 env :
5657 FIREBASE_API_KEY : ${{ secrets.FIREBASE_API_KEY }}
5758 FIREBASE_DB : ${{ secrets.FIREBASE_DB }}
58- POSTGRES_PASSWORD : test
59- POSTGRES_USER : test
60- POSTGRES_DB : test
59+ POSTGRES_PASSWORD : postgres
60+ POSTGRES_USER : postgres
61+ POSTGRES_DB : postgres
6162 OSMCHA_API_KEY : ${{ secrets.OSMCHA_API_KEY }}
63+ DJANGO_SECRET_KEY : test-django-secret-key
6264 run : |
63- docker-compose run mapswipe_workers_creation python -m unittest discover --verbose --start-directory tests/unittests/
64- docker-compose run mapswipe_workers_creation python -m unittest discover --verbose --start-directory tests/integration/
65+ docker-compose run --rm mapswipe_workers_creation python -m unittest discover --verbose --start-directory tests/unittests/
66+ docker-compose run --rm mapswipe_workers_creation bash -c 'pip install pytest && pytest -ra -v --durations=10 tests/integration/'
67+ docker-compose run --rm django pytest -ra -v --durations=10
0 commit comments