add coveralls to actions

This commit is contained in:
Bastien Gérard 2020-11-15 14:02:03 +01:00 committed by Bastien Gerard
parent 6e332e782b
commit cc591a634a
2 changed files with 12 additions and 4 deletions

View File

@ -20,7 +20,8 @@ env:
PYMONGO_3_9: 3.9 PYMONGO_3_9: 3.9
PYMONGO_3_11: 3.11 PYMONGO_3_11: 3.11
# MAIN_PYTHON_VERSION: 3.7 MAIN_PYTHON_VERSION: 3.7
jobs: jobs:
linting: linting:
runs-on: ubuntu-latest 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" 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 - 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" 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: build_doc_dryrun:
# ensures that readthedocs can be built continuously # 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 egg_info -b ".dev`date '+%Y%m%d%H%M%S'`" build sdist bdist_wheel
# python setup.py sdist bdist_wheel # python setup.py sdist bdist_wheel
- name: publish test-pypi - name: publish test-pypi
if: github.event_name != 'pull_request'
uses: pypa/gh-action-pypi-publish@master uses: pypa/gh-action-pypi-publish@master
with: with:
password: ${{ secrets.test_pypi_password }} password: ${{ secrets.test_pypi_token }}
repository_url: https://test.pypi.org/legacy/ repository_url: https://test.pypi.org/legacy/
## Must clean prev files and rebuild here
# - name: publish pypi # - name: publish pypi
# uses: pypa/gh-action-pypi-publish@master # uses: pypa/gh-action-pypi-publish@master
# if: github.event_name == 'create' && startsWith(github.ref, 'refs/tags/v') # if: github.event_name == 'create' && startsWith(github.ref, 'refs/tags/v')
# with: # with:
# password: ${{ secrets.pypi_password }} # password: ${{ secrets.pypi_token }}

View File

@ -112,7 +112,7 @@ extra_opts = {
"tests_require": [ "tests_require": [
"pytest<5.0", "pytest<5.0",
"pytest-cov", "pytest-cov",
"coverage<5.0", # recent coverage switched to sqlite format for the .coverage file which isn't handled properly by coveralls "coverage",
"blinker", "blinker",
"Pillow>=7.0.0", "Pillow>=7.0.0",
], ],