Remove six
from dependencies
#96
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
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions | |
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions | |
name: Python package | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: ["3.8", "3.9", "3.10", "3.11", 'pypy-3.9'] | |
django: | |
- "Django>=3.2,<3.3" | |
- "Django>=4.0,<4.1" | |
- "Django>=4.1,<4.2" | |
services: | |
# Label used to access the service container | |
postgres: | |
# Docker Hub image | |
image: postgis/postgis | |
# Provide the password for postgres | |
env: | |
POSTGRES_USER: postgres | |
POSTGRES_PASSWORD: postgres | |
POSTGRES_DB: django_fakery | |
# Set health checks to wait until postgres has started | |
options: >- | |
--health-cmd pg_isready | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
ports: | |
# Maps tcp port 5432 on service container to the host | |
- 5432:5432 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
env: | |
DJANGO: ${{ matrix.django }} | |
PYTHON_VERSION: ${{ matrix.python-version }} | |
run: | | |
python -m pip install --upgrade pip | |
pip install wheel | |
sudo apt-add-repository ppa:ubuntugis/ubuntugis-unstable | |
sudo apt-get update | |
pip install -q $DJANGO | |
python -m pip install psycopg2cffi coveralls | |
if [[ "$PYTHON_VERSION" != pypy* ]]; then pip install "psycopg2-binary"; fi | |
if [[ "$PYTHON_VERSION" != pypy* ]]; then sudo apt-get install gdal-bin libgdal-dev libgeos-dev; fi | |
if [[ "$PYTHON_VERSION" != pypy* ]]; then pip install "numpy"; fi | |
if [[ "$PYTHON_VERSION" != pypy* ]]; then pip install "GDAL==3.6.2"; fi | |
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi | |
- name: Test | |
run: | | |
coverage run --source django_fakery setup.py test | |
env: | |
DJANGO: ${{ matrix.django }} | |
PYTHON_VERSION: ${{ matrix.python-version }} | |
POSTGRES_HOST: "127.0.0.1" | |
POSTGRES_PASSWORD: postgres | |
- name: Upload coverage data to coveralls.io | |
run: coveralls | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
COVERALLS_FLAG_NAME: ${{ matrix.test-name }} | |
COVERALLS_PARALLEL: true | |
COVERALLS_SERVICE_NAME: github | |
finish: | |
needs: build | |
runs-on: ubuntu-latest | |
container: python:3-slim | |
steps: | |
- name: Finished | |
run: | | |
pip3 install --upgrade coveralls | |
coveralls --finish | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
COVERALLS_SERVICE_NAME: github |