From bd261b766813417409db06f93a93b13cab6bb93e Mon Sep 17 00:00:00 2001 From: Roman Mogylatov Date: Tue, 26 Jan 2021 19:25:10 -0500 Subject: [PATCH] Add tests & linters to publishing job --- .github/workflows/publishing.yml | 42 ++++++++++++++++++++++++-------- 1 file changed, 32 insertions(+), 10 deletions(-) diff --git a/.github/workflows/publishing.yml b/.github/workflows/publishing.yml index 31887b24..d3b4703a 100644 --- a/.github/workflows/publishing.yml +++ b/.github/workflows/publishing.yml @@ -7,8 +7,38 @@ on: jobs: + tests: + name: Run tests + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-python@v2 + with: + python-version: 3.9 + - run: pip install tox + - run: tox + env: + TOXENV: 3.9 + + linters: + name: Run linters + runs-on: ubuntu-latest + strategy: + matrix: + toxenv: [flake8, pydocstyle, mypy, pylint] + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-python@v2 + with: + python-version: 3.9 + - run: pip install tox + - run: tox + env: + TOXENV: ${{ matrix.toxenv }} + build-sdist: name: Build source tarball + needs: [tests, linters] runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 @@ -22,6 +52,7 @@ jobs: build-wheels: name: Build wheels + needs: [tests, linters] runs-on: ${{ matrix.os }} strategy: matrix: @@ -43,6 +74,7 @@ jobs: build-wheels-linux-custom-archs: name: Build wheels Linux custom archs + needs: [tests, linters] runs-on: ubuntu-latest strategy: matrix: @@ -74,13 +106,3 @@ jobs: user: __token__ password: ${{ secrets.PYPI_API_TOKEN }} repository_url: https://test.pypi.org/legacy/ - -# - services: docker -# arch: arm64 -# if: tag IS present -# env: TWINE_USERNAME=__token__ -# install: python3 -m pip install cibuildwheel==1.6.3 -# script: python3 -m cibuildwheel --output-dir wheelhouse -# after_success: -# - python3 -m pip install --upgrade --upgrade-strategy eager twine -# - python3 -m twine upload wheelhouse/*.whl