Skip to content

Bump actions/checkout from 3 to 4 (#133) #149

Bump actions/checkout from 3 to 4 (#133)

Bump actions/checkout from 3 to 4 (#133) #149

Workflow file for this run

name: CI
on:
push:
branches:
- master
pull_request:
branches:
- master
env:
DATABASE_USER: postgres
DATABASE_PASSWORD: postgres
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install package dependencies
run: |
sudo apt-get install -y gdal-bin
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.11"
cache: pip
- name: Install Python dependencies
uses: py-actions/py-dependency-install@v4
with:
path: "requirements-dev.txt"
- name: run linters via pre-commit
run: |
pre-commit run --all --show-diff-on-failure --color=always
tests:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.8, 3.9, "3.10", "3.11"]
django-version: [3.2, "4.1", "4.2"]
services:
postgresql:
image: postgis/postgis:12-2.5
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: heroku_connect_test
ports:
- 5432:5432
steps:
- uses: actions/checkout@v4
- name: Install package dependencies
run: |
sudo apt-get install -y gdal-bin
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: pip
- name: Install Python dependencies
uses: py-actions/py-dependency-install@v4
with:
path: "requirements-dev.txt"
- name: override initial django installation
run: |
pip install Django~=${{ matrix.django-version }}
- name: run tests
run: |
coverage run --source=heroku_connect -m 'pytest'
coverage xml
- name: upload coverage to codecov
if: ${{ !github.event.pull_request.head.repo.fork && !(github.event_name == 'pull_request' && github.event.pull_request.user.login == 'dependabot[bot]') }}
uses: codecov/codecov-action@v3
with:
fail_ci_if_error: false
files: coverage.xml