changed postgis action #31
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: 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 |