From cc591a634a3fbd7b24726fbef2dd8059d056e006 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bastien=20G=C3=A9rard?= Date: Sun, 15 Nov 2020 14:02:03 +0100 Subject: [PATCH] add coveralls to actions --- .github/workflows/github-actions.yml | 14 +++++++++++--- setup.py | 2 +- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/.github/workflows/github-actions.yml b/.github/workflows/github-actions.yml index a1a3c403..43a70a85 100644 --- a/.github/workflows/github-actions.yml +++ b/.github/workflows/github-actions.yml @@ -20,7 +20,8 @@ env: PYMONGO_3_9: 3.9 PYMONGO_3_11: 3.11 -# MAIN_PYTHON_VERSION: 3.7 + MAIN_PYTHON_VERSION: 3.7 + jobs: linting: runs-on: ubuntu-latest @@ -66,6 +67,11 @@ jobs: run: tox -e $(echo py${{ matrix.python-version }}-mg${{ matrix.PYMONGO }} | tr -d . | sed -e 's/pypypy/pypy/') -- -a "-k=test_ci_placeholder" - name: Run test suite run: tox -e $(echo py${{ matrix.python-version }}-mg${{ matrix.PYMONGO }} | tr -d . | sed -e 's/pypypy/pypy/') -- -a "--cov=mongoengine" + - name: Send coverage to Coveralls + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + if: ${{ matrix.python-version == env.MAIN_PYTHON_VERSION }} + run: coveralls build_doc_dryrun: # ensures that readthedocs can be built continuously @@ -114,12 +120,14 @@ jobs: python setup.py egg_info -b ".dev`date '+%Y%m%d%H%M%S'`" build sdist bdist_wheel # python setup.py sdist bdist_wheel - name: publish test-pypi + if: github.event_name != 'pull_request' uses: pypa/gh-action-pypi-publish@master with: - password: ${{ secrets.test_pypi_password }} + password: ${{ secrets.test_pypi_token }} repository_url: https://test.pypi.org/legacy/ + ## Must clean prev files and rebuild here # - name: publish pypi # uses: pypa/gh-action-pypi-publish@master # if: github.event_name == 'create' && startsWith(github.ref, 'refs/tags/v') # with: -# password: ${{ secrets.pypi_password }} +# password: ${{ secrets.pypi_token }} diff --git a/setup.py b/setup.py index ffc35743..37b95e37 100644 --- a/setup.py +++ b/setup.py @@ -112,7 +112,7 @@ extra_opts = { "tests_require": [ "pytest<5.0", "pytest-cov", - "coverage<5.0", # recent coverage switched to sqlite format for the .coverage file which isn't handled properly by coveralls + "coverage", "blinker", "Pillow>=7.0.0", ],