CI - Run codecov on all tests, not just Py3.7 (#3654)
* CI - Run codecov on all tests, not just Py3.7 * Update build.yml * Update build.yml
This commit is contained in:
parent
737636f9df
commit
4ce936a284
2 changed files with 18 additions and 5 deletions
21
.github/workflows/build.yml
vendored
21
.github/workflows/build.yml
vendored
|
|
@ -105,20 +105,20 @@ jobs:
|
|||
pip install -r requirements-dev.txt
|
||||
pip install pytest-cov
|
||||
- name: Test with pytest
|
||||
if: ${{ matrix.python-version != 3.7 }}
|
||||
if: ${{ matrix.python-version == 2.7 }}
|
||||
run: |
|
||||
make test-only
|
||||
# Only need to configure coverage once
|
||||
# Pytest-cov explicitly fails in Py2 for XRay tests
|
||||
- name: Test with pytest/coverage
|
||||
if: ${{ matrix.python-version == 3.7 }}
|
||||
if: ${{ matrix.python-version != 2.7 }}
|
||||
run: |
|
||||
make test-coverage
|
||||
- name: "Upload coverage to Codecov"
|
||||
if: ${{ matrix.python-version == 3.7 && github.repository == 'spulec/moto'}}
|
||||
if: ${{ matrix.python-version != 2.7 && github.repository == 'spulec/moto'}}
|
||||
uses: codecov/codecov-action@v1
|
||||
with:
|
||||
fail_ci_if_error: true
|
||||
flags: unittests
|
||||
|
||||
testserver:
|
||||
name: Unit tests in Server Mode
|
||||
|
|
@ -157,10 +157,23 @@ jobs:
|
|||
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'}}
|
||||
uses: codecov/codecov-action@v1
|
||||
with:
|
||||
fail_ci_if_error: true
|
||||
flags: servertests
|
||||
|
||||
deploy:
|
||||
name: Deploy
|
||||
|
|
|
|||
2
Makefile
2
Makefile
|
|
@ -33,7 +33,7 @@ test-coverage:
|
|||
test: lint test-only
|
||||
|
||||
test_server:
|
||||
@TEST_SERVER_MODE=true pytest -sv --cov=moto --cov-report html ./tests/
|
||||
@TEST_SERVER_MODE=true pytest -sv --cov=moto --cov-report xml ./tests/
|
||||
|
||||
aws_managed_policies:
|
||||
scripts/update_managed_policies.py
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue