diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index d774e7a744..63acea2107 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -68,12 +68,12 @@ jobs: python-test: needs: detect-backend-changes + if: ${{ needs.detect-backend-changes.outputs.has-changes == 'true' }} runs-on: ${{ matrix.os }} strategy: max-parallel: 9 matrix: os: [windows-latest, ubuntu-20.04] - if: ${{ needs.detect-backend-changes.outputs.has-changes == 'true' }} steps: - name: Checkout GitHub repo (+ download lfs dependencies) uses: actions/checkout@v4 @@ -98,6 +98,20 @@ jobs: with: name: python-code-coverage-report path: coverage.xml + + python-tests: + needs: [detect-backend-changes, python-test] + if: ${{ needs.detect-backend-changes.outputs.has-changes == 'true' && always() }} + runs-on: ubuntu-20.04 + steps: + - name: Results of Python tests by OS + run: exit 1 + # See https://stackoverflow.com/a/67532120/4907315 + if: >- + ${{ + contains(needs.*.result, 'failure') + || contains(needs.*.result, 'cancelled') + }} ################################################################ ## Front-end @@ -216,8 +230,9 @@ jobs: ################################################################ sonarcloud: - runs-on: ubuntu-20.04 + if: ${{ always() }} needs: [python-test, npm-test] + runs-on: ubuntu-20.04 steps: - name: Checkout GitHub repo uses: actions/checkout@v4