From fb44654235737f718605f44258541a19d2cb2d99 Mon Sep 17 00:00:00 2001 From: Patrick Sanders Date: Wed, 2 Jun 2021 13:58:48 -0500 Subject: [PATCH] fix coveralls build step try another approach for coveralls pin coveralls to older version reenable coverage on PRs from forks --- .github/workflows/pythonpackage.yml | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/.github/workflows/pythonpackage.yml b/.github/workflows/pythonpackage.yml index f48c894..3f41f89 100644 --- a/.github/workflows/pythonpackage.yml +++ b/.github/workflows/pythonpackage.yml @@ -31,18 +31,10 @@ jobs: pre-commit run -a - name: Test with pytest/coverage run: | - pip install pytest coveralls - coverage run -a -m py.test policyuniverse/tests/test_expander_minimizer.py - coverage run -a -m py.test policyuniverse/tests/test_arn.py - coverage run -a -m py.test policyuniverse/tests/test_statement.py - coverage run -a -m py.test policyuniverse/tests/test_policy.py - coverage run -a -m py.test updater/test_service.py - coverage run -a -m py.test updater/test_service_action.py - - - name: Upload coverage data under py37 + pip install pytest pytest-cov coveralls==2.2.0 + pytest --cov + - name: Upload coverage data to coveralls.io + if: success() && matrix.python-version == '3.7' + run: coveralls env: - COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - if: success() && matrix.python-version == '3.7' && github.event.pull_request.head.repo.full_name == github.repository && github.actor != 'dependabot[bot]' - run: | - coveralls --service=github