Skip to content

Commit

Permalink
ci: Update test to use collector (#754)
Browse files Browse the repository at this point in the history
  • Loading branch information
hoxbro authored Oct 8, 2024
1 parent 256394b commit e5fd80b
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 12 deletions.
18 changes: 12 additions & 6 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -115,32 +115,30 @@ 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: 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 }}

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 @@ -149,10 +147,18 @@ 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: 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, 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
9 changes: 3 additions & 6 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
# This is the configuration for pre-commit, a local framework for managing pre-commit hooks
# Check out the docs at: https://pre-commit.com/

exclude: (\.min\.js$|\.svg$|\.html$)
default_stages: [commit]
default_stages: [pre-commit]
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
rev: v5.0.0
hooks:
- id: end-of-file-fixer
- id: trailing-whitespace
Expand All @@ -20,7 +17,7 @@ repos:
- id: check-json
- id: detect-private-key
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.6.6
rev: v0.6.9
hooks:
- id: ruff
files: geoviews/
Expand Down

0 comments on commit e5fd80b

Please sign in to comment.