Skip to content

Commit

Permalink
Fix tox step in main workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
pamella committed May 21, 2024
1 parent 5c5358c commit 392da52
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 23 deletions.
45 changes: 22 additions & 23 deletions .github/workflows/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,36 +2,35 @@ name: main

on:
push:
branches: [main]
branches: [main, fix/tox]
pull_request:
branches: [main]

jobs:
test:

runs-on: ubuntu-latest
strategy:
max-parallel: 4
max-parallel: 6
matrix:
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
django-version: ['3.2', '4.0', '4.1', '4.2', '5.0']
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
django-version: ["3.2", "4.0", "4.1", "4.2", "5.0"]

steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install tox-gh-actions
run: |
python -m pip install --upgrade pip
python -m pip install tox tox-gh-actions
- name: Run tests with tox
env:
OS: ${{ matrix.os }}
DJANGO: ${{ matrix.django-version }}
run: tox
- name: Run Codecov
run: |
python -m pip install codecov
codecov
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install tox-gh-actions
run: |
python -m pip install --upgrade pip
python -m pip install tox tox-gh-actions
- name: Run tests with tox
env:
OS: ${{ matrix.os }}
DJANGO: ${{ matrix.django-version }}
run: tox
- name: Run Codecov
run: |
python -m pip install codecov
codecov
9 changes: 9 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,15 @@ envlist =
py311-django{41,42,50}
py312-django{42,50}

[gh-actions]
python =
3.7: py37-django{111,21,22,30,31,32}
3.8: py38-django{22,30,31,32,41,42}
3.9: py39-django{22,30,31,32,41,42}
3.10: py310-django{32,41,42,50}
3.11: py311-django{41,42,50}
3.12: py312-django{42,50}

[pytest]
DJANGO_SETTINGS_MODULE = test_settings
addopts = --cov drf_rw_serializers --cov-report term-missing --cov-report xml
Expand Down

0 comments on commit 392da52

Please sign in to comment.