mirror of
https://github.com/jazzband/dj-database-url.git
synced 2026-03-16 22:20:24 +00:00
thanks @jefftriplett for the example - https://github.com/jefftriplett/python-github-actions-matrix-demo
35 lines
1.1 KiB
YAML
35 lines
1.1 KiB
YAML
name: test
|
|
on: [push]
|
|
jobs:
|
|
test:
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
python-version: [2.7, 3.5, 3.6, 3.7, 3.8]
|
|
django-version: [1.11, 2.0, 2.1, 2.2, 3.0]
|
|
exclude:
|
|
# Python 2.7 is only compatible with Django 1.11
|
|
- python-version: 2.7
|
|
django-version: 2.0
|
|
- python-version: 2.7
|
|
django-version: 2.1
|
|
- python-version: 2.7
|
|
django-version: 2.2
|
|
- python-version: 2.7
|
|
django-version: 3.0
|
|
# Python 3.5 is compatible with Django 1.11 to 2.2 but not 3.0
|
|
- python-version: 3.5
|
|
django-version: 3.0
|
|
fail-fast: false
|
|
steps:
|
|
- uses: actions/checkout@v1
|
|
- name: Set up Python ${{ matrix.python-version }}
|
|
uses: actions/setup-python@v1
|
|
with:
|
|
python-version: ${{ matrix.python-version }}
|
|
- name: Run Tests
|
|
run: |
|
|
echo "${{ matrix.python-version }} -> ${{ matrix.django-version }}"
|
|
pip install -U pip
|
|
pip install "Django~=${{ matrix.django-version }}.0" .
|
|
python test_dj_database_url.py
|