forked from elpaso/qgis-feed
-
Notifications
You must be signed in to change notification settings - Fork 7
56 lines (46 loc) · 1.39 KB
/
test.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
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: 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