Social share #132
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: pr-test | |
on: | |
pull_request: | |
branches: | |
- master | |
push: | |
branches: | |
- master | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: | |
- '3.8' | |
steps: | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v3 | |
with: | |
python-version: ${{ matrix.python-version }} | |
architecture: x64 | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Install Python requirements | |
run: pip install -r REQUIREMENTS.txt | |
test: | |
runs-on: ubuntu-latest | |
needs: | |
- lint | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Generate the .env file | |
run: cp env.template .env | |
- name: Run docker-compose build | |
run: docker compose -f docker-compose.dev.yml build | |
- name: Run the containers | |
run: docker compose -f docker-compose.dev.yml up -d postgis qgisfeed webpack | |
- name: Wait for the containers to start | |
run: sleep 60 | |
- name: Run test | |
run: | | |
docker compose -f docker-compose.dev.yml exec -T qgisfeed python qgisfeedproject/manage.py makemigrations | |
docker compose -f docker-compose.dev.yml exec -T qgisfeed python qgisfeedproject/manage.py migrate | |
docker compose -f docker-compose.dev.yml exec -T qgisfeed python qgisfeedproject/manage.py test qgisfeed | |
exit_code=$? | |
docker compose -f docker-compose.dev.yml down | |
exit $exit_code |