Skip to content

#277 ditched tox in favor of github actions #342

#277 ditched tox in favor of github actions

#277 ditched tox in favor of github actions #342

Workflow file for this run

# This workflow will install Python dependencies, run tests and lint with a variety of Python versions

Check failure on line 1 in .github/workflows/test.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/test.yml

Invalid workflow file

No steps defined in `steps` and no workflow called in `uses` for the following jobs: django-1-2-3, django-4
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: Tests
on:
push:
branches:
- main
pull_request:
branches:
- "main"
- "feature/**"
- "version-3.x/**"
jobs:
lint:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.9]
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 Poetry
uses: snok/install-poetry@v1
with:
virtualenvs-create: true
virtualenvs-in-project: false
- name: Install dependencies
run: |
poetry install
- name: Run linters
run: make lint
functional:
needs: lint
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"]
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 Poetry
uses: snok/install-poetry@v1
with:
version: 1.4.2
virtualenvs-create: true
virtualenvs-in-project: false
- name: Install dependencies
run: |
poetry install
- name: Test with pytest
run: |
make test-functional
django-1-2-3:
needs: functional
runs-on: ubuntu-latest
strategy:
matrix:
# https://docs.djangoproject.com/en/2.2/faq/install/#what-python-version-can-i-use-with-django
# https://docs.djangoproject.com/en/3.2/faq/install/#what-python-version-can-i-use-with-django
python-version: ["3.7", "3.8", "3.9"]
django-version: ["2.2", "3.0", "3.1", "3.2"]
include:
- python-version: "3.7"
django-version: "1.11"
- python-version: "3.7"
django-version: "2.0"
- python-version: "3.7"
django-version: "2.1"
- python-version: "3.10"
django-version: "3.2"
django-4:
needs: functional
runs-on: ubuntu-latest
strategy:
matrix:
# https://docs.djangoproject.com/en/4.2/faq/install/#what-python-version-can-i-use-with-django
python-version: ["3.8", "3.9", "3.10"]
django-version: ["4.0", "4.1", "4.2"]
include:
- python-version: "3.11"
django-version: "4.1"
- python-version: "3.11"
django-version: "4.2"
- python-version: "3.12"
django-version: "4.2"
django-5:
needs: functional
runs-on: ubuntu-latest
strategy:
matrix:
# https://docs.djangoproject.com/en/dev/faq/install/#what-python-version-can-i-use-with-django
python-version: ["3.10", "3.11", "3.12"]
django-version: ["5.0"]
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 Poetry
uses: snok/install-poetry@v1
with:
version: 1.4.2
virtualenvs-create: true
virtualenvs-in-project: false
- name: Install dependencies
run: |
poetry install
- name: Install specific Django version
run: |
poetry run pip install django~=${{ matrix.django-version }}
- name: Test with pytest
run: |
make test-django
integration:
needs: functional
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.9]
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 Poetry
uses: snok/install-poetry@v1
with:
virtualenvs-create: true
virtualenvs-in-project: false
- name: Install dependencies
run: |
poetry install
- name: Test with pytest
run: |
make test-integration