Skip to content

try

try #37

Workflow file for this run

name: Tests
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
python-version: ['3.9', '3.10', '3.11']
django-version: ['3.2', '4.0', '4.2']
services:
postgres:
image: postgres:14
ports:
- 5432:5432
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: postgres
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.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 -e .[test]
pip install -r requirements.txt
pip install "django~=${{ matrix.django-version }}.0"
- name: Run tests
env:
DATABASE_USER: postgres
DATABASE_PASSWORD: postgres
DATABASE_HOST: localhost
DATABASE_NAME: postgres
run: |
coverage run --parallel -m pytest -x
lint_python:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e .[test]
pip install -r requirements.txt
- name: Run linters
run: |
flake8 oscar_invoices tests sandbox setup.py
isort -c -q --diff oscar_invoices/ sandbox/ tests/