From 3ae816d64d987d7ed26287451b93b7eadf113d54 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20K=C3=A4ufl?= Date: Thu, 16 Dec 2021 12:51:11 +0100 Subject: [PATCH 1/2] Switch from Travis CI to GitHub Actions --- .github/workflows/tests.yml | 42 +++++++++++++++++++++++++++++++++++++ .travis.yml | 24 --------------------- 2 files changed, 42 insertions(+), 24 deletions(-) create mode 100644 .github/workflows/tests.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml new file mode 100644 index 0000000..8ee5c36 --- /dev/null +++ b/.github/workflows/tests.yml @@ -0,0 +1,42 @@ +--- +name: Tests + +on: + push: + branches: + - develop + - master + pull_request: + +jobs: + tests: + name: Python ${{ matrix.python-version }}, Django ${{ matrix.django-version }} + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + python-version: + - "3.6" + - "3.7" + - "3.8" + - "3.9" + django-version: + - "2.2.17" # first version to support Python 3.9 + - "3.1.3" # first version to support Python 3.9 + - "3.2.0" + + steps: + - uses: actions/checkout@v2 + + - 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 wheel setuptools + python -m pip install --upgrade "django~=${{ matrix.django-version}}" + - name: Run tests + run: python manage.py test + working-directory: sample_project diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 9512fe1..0000000 --- a/.travis.yml +++ /dev/null @@ -1,24 +0,0 @@ -arch: - - amd64 - - ppc64le -language: python -python: - - "3.6" - - "3.7" - - "3.8" - - "3.9" -env: - - DJANGO_VERSION=2.2 SAMPLE_PROJECT=sample_project - - DJANGO_VERSION=3.1 SAMPLE_PROJECT=sample_project - - DJANGO_VERSION=3.2 SAMPLE_PROJECT=sample_project - -branches: - only: - - develop - -install: - - pip install django==$DJANGO_VERSION - -script: - - cd $SAMPLE_PROJECT - - python manage.py test From c44edfe40a4e12e384d8b1ea1a98c5a8cc982714 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20K=C3=A4ufl?= Date: Thu, 16 Dec 2021 12:57:57 +0100 Subject: [PATCH 2/2] Run tests against Python 3.10 and Django 4.0 --- .github/workflows/tests.yml | 10 ++++++++++ README.md | 2 +- README.rst | 2 +- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 8ee5c36..1b2c3b4 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -24,6 +24,16 @@ jobs: - "2.2.17" # first version to support Python 3.9 - "3.1.3" # first version to support Python 3.9 - "3.2.0" + include: + - python-version: "3.8" + django-version: "4.0.0" + - python-version: "3.9" + django-version: "4.0.0" + - python-version: "3.10" + django-version: "3.2.9" # first version to support Python 3.10 + - python-version: "3.10" + django-version: "4.0.0" + steps: - uses: actions/checkout@v2 diff --git a/README.md b/README.md index 2699abd..fb9d008 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,7 @@ Sorting inlines: ![sortable-inlines](http://res.cloudinary.com/alsoicode/image/upload/v1451237555/django-admin-sortable/sortable-inlines.jpg) ## Supported Django Versions -For Django 3 use the latest version +For Django 3 and 4 use the latest version For Django 1.8.x < 3.0, use 2.1.8. diff --git a/README.rst b/README.rst index fff0fd5..5c5c05a 100644 --- a/README.rst +++ b/README.rst @@ -27,7 +27,7 @@ Sorting inlines: Supported Django Versions ------------------------- -For Django 3 use the latest version +For Django 3 and 4 use the latest version For Django 1.8.x < 3.0, use 2.1.8.