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
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 -r requirements-dev.txt
|
||||||
pip install pytest-cov
|
pip install pytest-cov
|
||||||
- name: Test with pytest
|
- name: Test with pytest
|
||||||
if: ${{ matrix.python-version != 3.7 }}
|
if: ${{ matrix.python-version == 2.7 }}
|
||||||
run: |
|
run: |
|
||||||
make test-only
|
make test-only
|
||||||
# Only need to configure coverage once
|
|
||||||
# Pytest-cov explicitly fails in Py2 for XRay tests
|
# Pytest-cov explicitly fails in Py2 for XRay tests
|
||||||
- name: Test with pytest/coverage
|
- name: Test with pytest/coverage
|
||||||
if: ${{ matrix.python-version == 3.7 }}
|
if: ${{ matrix.python-version != 2.7 }}
|
||||||
run: |
|
run: |
|
||||||
make test-coverage
|
make test-coverage
|
||||||
- name: "Upload coverage to Codecov"
|
- 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
|
uses: codecov/codecov-action@v1
|
||||||
with:
|
with:
|
||||||
fail_ci_if_error: true
|
fail_ci_if_error: true
|
||||||
|
flags: unittests
|
||||||
|
|
||||||
testserver:
|
testserver:
|
||||||
name: Unit tests in Server Mode
|
name: Unit tests in Server Mode
|
||||||
@ -157,10 +157,23 @@ jobs:
|
|||||||
python -m pip install --upgrade pip
|
python -m pip install --upgrade pip
|
||||||
pip install -r requirements-dev.txt
|
pip install -r requirements-dev.txt
|
||||||
- name: Test ServerMode
|
- name: Test ServerMode
|
||||||
|
if: ${{ matrix.python-version == 2.7 }}
|
||||||
env:
|
env:
|
||||||
TEST_SERVER_MODE: ${{ true }}
|
TEST_SERVER_MODE: ${{ true }}
|
||||||
run: |
|
run: |
|
||||||
make test-only
|
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:
|
deploy:
|
||||||
name: Deploy
|
name: Deploy
|
||||||
|
2
Makefile
2
Makefile
@ -33,7 +33,7 @@ test-coverage:
|
|||||||
test: lint test-only
|
test: lint test-only
|
||||||
|
|
||||||
test_server:
|
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:
|
aws_managed_policies:
|
||||||
scripts/update_managed_policies.py
|
scripts/update_managed_policies.py
|
||||||
|
Loading…
Reference in New Issue
Block a user