diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 0d60910..b7a8075 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -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 diff --git a/MANIFEST.in b/MANIFEST.in index 0ae7435..07c8b0c 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -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 diff --git a/setup.cfg b/setup.cfg index 8489fab..ff38b07 100644 --- a/setup.cfg +++ b/setup.cfg @@ -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 diff --git a/tox.ini b/tox.ini new file mode 100644 index 0000000..0a3cf7a --- /dev/null +++ b/tox.ini @@ -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}