diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4c81af93..db0f029a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,7 +18,14 @@ jobs: run: pip install coverage - name: Run tests and collect coverage run: | - coverage run -m unittest discover -s src + cd ./src/extension/tests + echo '===============START EXTENSION TESTS...===============' >> ../../../err.txt + coverage run -m unittest discover -s . -t ../../ 2>> ../../../err.txt + echo '===============FINISH EXTENSION TESTS...===============' >> ../../../err.txt + cd ../../core/tests + echo '===============START CORE TESTS...===============' >> ../../../err.txt + coverage run -m unittest discover -s . -t ../../ 2>> ../../../err.txt + echo '===============FINISH CORE TESTS...===============' >> ../../../err.txt coverage xml - name: Upload coverage to Codecov uses: codecov/codecov-action@v2 @@ -26,6 +33,14 @@ jobs: flags: python39 name: python-39 fail_ci_if_error: true + - name: Read test output + id: getoutput + run: echo "::set-output name=contents::$(cat err.txt)" + - name: Check if all tests passed + if: contains( steps.getoutput.outputs.contents , 'FAILED (failures=' ) + run: | + echo "${{ steps.getoutput.outputs.contents }}" + exit 1 codecov-python-27: runs-on: windows-latest steps: @@ -39,7 +54,14 @@ jobs: run: pip install coverage - name: Run tests and collect coverage run: | - coverage run -m unittest discover -s src + cd ./src/extension/tests + echo '===============START EXTENSION TESTS...===============' >> ../../../err2.txt + coverage run -m unittest discover -s . -t ../../ 2>> ../../../err2.txt + echo '===============FINISH EXTENSION TESTS...===============' >> ../../../err2.txt + cd ../../core/tests + echo '===============START CORE TESTS...===============' >> ../../../err2.txt + coverage run -m unittest discover -s . -t ../../ 2>> ../../../err2.txt + echo '===============FINISH CORE TESTS...===============' >> ../../../err2.txt coverage xml - name: Upload coverage to Codecov uses: codecov/codecov-action@v2 @@ -47,3 +69,11 @@ jobs: flags: python27 name: python-27 fail_ci_if_error: true + - name: Read test output + id: getoutput + run: echo "::set-output name=contents::$(cat err2.txt)" + - name: Check if all tests passed + if: contains( steps.getoutput.outputs.contents, 'FAILED (failures=' ) + run: | + echo "${{ steps.getoutput.outputs.contents }}" + exit 1