-
Notifications
You must be signed in to change notification settings - Fork 23
56 lines (51 loc) · 1.65 KB
/
tests.yml
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: Tests
on: [ "push", "pull_request" ]
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python_version: [ '3.10', '3.11', '3.12' ]
django_version: [ '3.2.12', '4.2', '5.0.3' ]
steps:
- uses: nyaruka/postgis-action@v2.1.0
with:
postgresql version: '12'
postgis version: '2.5'
postgresql password: 'password'
postgresql user: 'test'
postgresql db: 'test'
- uses: actions/checkout@v2
- name: Set up Python version
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python_version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install coverage
pip install coveralls
pip install Django==${{ matrix.django_version }}
pip install psycopg2
- name: install GDAL
run: |
sudo add-apt-repository ppa:ubuntugis/ppa
sudo apt-get update
sudo apt-get install binutils libproj-dev gdal-bin
- name: Run tests
run: coverage run --source=mapbox_location_field manage.py test
- name: Coveralls
uses: AndreMiras/coveralls-python-action@develop
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
parallel: true
flag-name: django-${{ matrix.django_version }}-python-${{ matrix.python_version }}
finish:
needs: test
runs-on: ubuntu-latest
steps:
- name: Coveralls Finished
uses: AndreMiras/coveralls-python-action@develop
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
parallel-finished: true