Skip to content

Commit

Permalink
refactor: move tox config to its own file
Browse files Browse the repository at this point in the history
  • Loading branch information
jerivas committed May 31, 2021
1 parent c6805fb commit 5a6dffa
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 39 deletions.
23 changes: 8 additions & 15 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,35 +7,28 @@ on:

jobs:

# Test
test:
# Lint
lint:
runs-on: ubuntu-latest
strategy:
matrix:
python: [3.9]

steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python }}
python-version: 3.9
- name: Install dependencies
run: pip install tox tox-gh-actions -U pip
- name: Run tests
run: |
tox --skip-missing-interpreters=false --parallel
env:
TOX_PARALLEL_NO_SPINNER: 1
run: pip install tox -U pip
- name: Lint
run: tox -e package

# Create a new semantic release
release:
needs: test
needs: [lint]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v1
with:
python-version: 3.8
python-version: 3.9
- uses: cycjimmy/semantic-release-action@v2
with:
semantic_version: 17
Expand Down
2 changes: 1 addition & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ recursive-include grappelli_safe/templates *.html
recursive-include grappelli_safe/locale *.mo *.po
recursive-include grappelli_safe/models/fixtures *.json

exclude .releaserc
exclude .releaserc tox.ini
23 changes: 0 additions & 23 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -27,26 +27,3 @@ include_package_data = true

[bdist_wheel]
universal = 1

# Testing

[tox:tox]
skip_missing_interpreters = true
envlist =
package

[testenv:package]
# Check package integrity and compatibility with PyPI
deps =
twine
check-manifest
skip_install = true
commands =
python setup.py -q sdist --dist-dir="{envtmpdir}/dist"
twine check "{envtmpdir}/dist/*"
check-manifest --ignore-bad-ideas '*.mo' {toxinidir}

[gh-actions]
# Connect GitHub Action matrices with tox envs
python =
3.9: package
15 changes: 15 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
[tox]
skip_missing_interpreters = true
envlist =
package

[testenv:package]
# Check package integrity and compatibility with PyPI
deps =
twine
check-manifest
skip_install = true
commands =
python setup.py -q sdist --dist-dir="{envtmpdir}/dist"
twine check "{envtmpdir}/dist/*"
check-manifest --ignore-bad-ideas '*.mo' {toxinidir}

0 comments on commit 5a6dffa

Please sign in to comment.