-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
django 3-4 migration: unittests gh workflow
- Loading branch information
Showing
2 changed files
with
58 additions
and
61 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file was deleted.
Oops, something went wrong.