Skip to content

Commit

Permalink
Make GHA tox work
Browse files Browse the repository at this point in the history
  • Loading branch information
marazmiki committed Jan 6, 2022
1 parent 17a162b commit de87c82
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 20 deletions.
27 changes: 8 additions & 19 deletions .github/workflows/tox.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,37 +9,26 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.6, 3.7, 3.8, 3.9]
python-version: [3.6, 3.7, 3.8, 3.9, 3.10.0]

steps:
- uses: actions/checkout@v1
- 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
pip install tox tox-gh-actions poetry
pip install tox tox-gh-actions coveralls
- name: Run test in tox
run: tox
run: tox -- --cov-report=xml

- name: Run coveralls
uses: AndreMiras/coveralls-python-action@develop
with:
parallel: true
flag-name: Unit Test

coveralls_finish:
needs: build
runs-on: ubuntu-latest

steps:
- name: Coveralls Finished
uses: AndreMiras/coveralls-python-action@develop
with:
parallel-finished: true
run: converalls
env:
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}

9 changes: 8 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,13 @@ basepython =
py39: python3.9
py310: python3.10

[gh-actions]
python =
3.7: py37
3.8: py38
3.9: py39
3.10: py310

[testenv]
deps =
dj-database-url
Expand All @@ -31,7 +38,7 @@ deps =

commands =
poetry install
pytest -s -v --isort --flake8 --cov=tests --cov=disguise --cov=tests --cov-config=coverage.ini --cov-append {posargs}
pytest -s -v --isort --flake8 --cov=. --cov-config=coverage.ini --cov-append --cov-report=term {posargs}

whitelist_externals =
poetry
Expand Down

0 comments on commit de87c82

Please sign in to comment.