Skip to content

Commit

Permalink
ci: Add collector to avoid if statements (#6398)
Browse files Browse the repository at this point in the history
  • Loading branch information
hoxbro authored Sep 28, 2024
1 parent b58b3c6 commit 6d36abe
Showing 1 changed file with 13 additions and 11 deletions.
24 changes: 13 additions & 11 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -115,36 +115,33 @@ 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) }}
timeout-minutes: 120
steps:
- uses: holoviz-dev/holoviz_tasks/pixi_install@v0
if: needs.setup.outputs.code_change == 'true'
with:
environments: ${{ matrix.environment }}
- name: Check packages latest version
if: needs.setup.outputs.code_change == 'true'
run: |
pixi run -e ${{ matrix.environment }} check-latest-packages bokeh panel param datashader
- name: Test Unit
if: needs.setup.outputs.code_change == 'true'
run: |
pixi run -e ${{ matrix.environment }} test-unit $COV
- name: Test Examples
if: needs.setup.outputs.code_change == 'true'
run: |
pixi run -e ${{ matrix.environment }} test-example
- uses: codecov/codecov-action@v4
if: needs.setup.outputs.code_change == 'true'
with:
token: ${{ secrets.CODECOV_TOKEN }}

ui_test_suite:
name: ui:${{ 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:
Expand All @@ -155,11 +152,9 @@ jobs:
PANEL_LOG_LEVEL: info
steps:
- uses: holoviz-dev/holoviz_tasks/pixi_install@v0
if: needs.setup.outputs.code_change == 'true'
with:
environments: ${{ matrix.environment }}
- name: Test UI
if: needs.setup.outputs.code_change == 'true'
run: |
# Create a .uicoveragerc file to set the concurrency library to greenlet
# https://github.com/microsoft/playwright-python/issues/313
Expand All @@ -173,14 +168,14 @@ jobs:
path: ./ui_screenshots
if-no-files-found: ignore
- uses: codecov/codecov-action@v4
if: needs.setup.outputs.code_change == 'true'
with:
token: ${{ secrets.CODECOV_TOKEN }}

core_test_suite:
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:
Expand All @@ -189,14 +184,21 @@ jobs:
timeout-minutes: 120
steps:
- uses: holoviz-dev/holoviz_tasks/pixi_install@v0
if: needs.setup.outputs.code_change == 'true'
with:
environments: ${{ matrix.environment }}
- name: Check packages latest version
if: needs.setup.outputs.code_change == 'true'
run: |
pixi run -e ${{ matrix.environment }} check-latest-packages numpy pandas bokeh panel param
- name: Test Unit
if: needs.setup.outputs.code_change == 'true'
run: |
pixi run -e ${{ matrix.environment }} test-unit
result_test_suite:
name: result:test
needs: [unit_test_suite, ui_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

0 comments on commit 6d36abe

Please sign in to comment.