Skip to content

Initial

Initial #1

Workflow file for this run

name: Test
on: [push]
jobs:
test:
runs-on: ubuntu-latest
name: Python ${{ matrix.python-version }} sample
strategy:
matrix:
python-version: [ 3.6, 3.7, 3.8, 3.9, 'pypy-3.6', 'pypy-3.7' ]
continue-on-error: false
services:
database:
image: postgres:12
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: postgres
ports:
- 5432:5432
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
env:
DJANGO_DATABASE_HOST: localhost
DJANGO_DATABASE_USER: postgres
DJANGO_DATABASE_PASSWORD: postgres
DJANGO_DATABASE_NAME: postgres
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Depedencies
run: |
python -m pip install wheel
python -m pip install pytest pytest-django pytest-cov psycopg2-binary
python setup.py develop
- name: Run tests
run: >-
pytest -v -x
--cov=django_ltree
--junitxml=junit/test-results-${{ matrix.python-version }}.xml
tests/
- name: Upload pytest test results
uses: actions/upload-artifact@v2
with:
name: pytest-results-${{ matrix.python-version }}
path: junit/test-results-${{ matrix.python-version }}.xml
if: ${{ always() }}