diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 60c49b9c0..97eb2064b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -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 diff --git a/Makefile b/Makefile index 8d88d96c7..0b708bd0b 100644 --- a/Makefile +++ b/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