Enable Py2 test coverage (#3698)

* Enable Py2 test coverage

* Coverage - exclude XRay as it's throwing errors

* Update requirements-tests.txt

* Revert "Coverage - exclude XRay as it's throwing errors"

This reverts commit bb58e0ef847301af034bee5992966a0474c19f9a.

* Enable coverage for all workflows
This commit is contained in:
Bert Blommers 2021-02-16 17:03:41 +00:00 committed by GitHub
commit afdab66218
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 18 deletions

View file

@ -105,16 +105,10 @@ jobs:
pip install -r requirements-dev.txt
pip install pytest-cov
- name: Test with pytest
if: ${{ matrix.python-version == 2.7 }}
run: |
make test-only
# Pytest-cov explicitly fails in Py2 for XRay tests
- name: Test with pytest/coverage
if: ${{ matrix.python-version != 2.7 }}
run: |
make test-coverage
- name: "Upload coverage to Codecov"
if: ${{ matrix.python-version != 2.7 && github.repository == 'spulec/moto'}}
if: ${{ github.repository == 'spulec/moto'}}
uses: codecov/codecov-action@v1
with:
fail_ci_if_error: true
@ -158,20 +152,13 @@ jobs:
run: |
python -m pip install --upgrade pip
pip install -r requirements-dev.txt
- name: Test ServerMode
if: ${{ matrix.python-version == 2.7 }}
env:
TEST_SERVER_MODE: ${{ true }}
run: |
make test-only
- name: Test ServerMode/Coverage
if: ${{ matrix.python-version != 2.7 }}
env:
TEST_SERVER_MODE: ${{ true }}
run: |
make test-coverage
- name: "Upload coverage to Codecov"
if: ${{ matrix.python-version != 2.7 && github.repository == 'spulec/moto'}}
if: ${{ github.repository == 'spulec/moto'}}
uses: codecov/codecov-action@v1
with:
fail_ci_if_error: true