Skip to content

Commit

Permalink
django 3-4 migration: unittests gh workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
dgk committed Aug 25, 2023
1 parent 1144a28 commit 191a8b0
Show file tree
Hide file tree
Showing 2 changed files with 58 additions and 61 deletions.
58 changes: 58 additions & 0 deletions .github/workflows/unittests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: unittests

on:
pull_request:
branches:
- master

jobs:
main:
runs-on: ubuntu-latest

strategy:
matrix:
python:
- "3.8"
- "3.9"
- "3.10"
- "3.11"
django:
- "3.2"
- "4.0"
- "4.1"
- "4.2"

env:
DJANGO_SETTINGS_MODULE: sites.test.settings

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Set up Python ${{ matrix.python }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python }}

- name: Set up pip
run: |
python -m pip install --upgrade pip
- name: Install Django ${{ matrix.django }}
run: |
DJANGO_VERSION_MAJOR=$(echo ${{ matrix.django }} | cut -d. -f1)
DJANGO_VERSION_NEXT_MINOR=$(($(echo ${{ matrix.django }} | cut -d. -f2) + 1))
python -m pip install "Django>=${{ matrix.django }},<$DJANGO_VERSION_MAJOR.$DJANGO_VERSION_NEXT_MINOR"
- name: Install django-admin-sortable2 for Django 3.2
if: ${{ matrix.django == '3.2' }}
run: |
python -m pip install django-admin-sortable2==1.0.4
- name: Install dependencies
run: |
python -m pip install -r requirements.test.txt
- name: Test
run: |
py.test tests
61 changes: 0 additions & 61 deletions .travis.yml

This file was deleted.

0 comments on commit 191a8b0

Please sign in to comment.