diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index d125879c9..b5c940531 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -48,7 +48,21 @@ jobs: runs-on: ubuntu-latest outputs: matrix: ${{ env.MATRIX }} + code_change: ${{ steps.filter.outputs.code }} steps: + - uses: actions/checkout@v4 + if: github.event_name != 'pull_request' + - name: Check for code changes + uses: dorny/paths-filter@v3 + id: filter + with: + filters: | + code: + - 'datashader/**' + - 'examples/**' + - 'pixi.toml' + - 'pyproject.toml' + - '.github/workflows/test.yaml' - name: Set matrix option run: | if [[ '${{ github.event_name }}' == 'workflow_dispatch' ]]; then @@ -98,6 +112,7 @@ jobs: name: unit:${{ matrix.environment }}:${{ matrix.os }} needs: [pre_commit, setup, pixi_lock] runs-on: ${{ matrix.os }} + if: needs.setup.outputs.code_change == 'true' strategy: fail-fast: false matrix: ${{ fromJson(needs.setup.outputs.matrix) }} @@ -126,6 +141,7 @@ jobs: name: core:${{ matrix.environment }}:${{ matrix.os }} needs: [pre_commit, setup, pixi_lock] runs-on: ${{ matrix.os }} + if: needs.setup.outputs.code_change == 'true' strategy: fail-fast: false matrix: @@ -139,3 +155,13 @@ jobs: - name: Test Unit run: | pixi run -e ${{ matrix.environment }} test-unit + + result_test_suite: + name: result:test + needs: [unit_test_suite, core_test_suite] + if: always() + runs-on: ubuntu-latest + steps: + - name: check for failures + if: contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') + run: echo job failed && exit 1