Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Only run test-suite on code change #6035

Merged
merged 1 commit into from
Dec 16, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 29 additions & 3 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,31 @@ jobs:
steps:
- uses: holoviz-dev/holoviz_tasks/pre-commit@v0.1a17

changes:
name: Check for code changes
runs-on: ubuntu-latest
permissions:
pull-requests: read
outputs:
code: ${{ steps.filter.outputs.code }}
steps:
- uses: actions/checkout@v3
if: github.event_name != 'pull_request'
- uses: dorny/paths-filter@v2.11.1
id: filter
with:
filters: |
code:
- 'holoviews/**'
- 'examples/**'
- 'setup.py'
- 'pyproject.toml'
- '.github/workflows/test.yaml'

unit_test_suite:
name: Unit tests on Python ${{ matrix.python-version }}, ${{ matrix.os }}
needs: [pre_commit]
needs: [pre_commit, changes]
if: needs.changes.outputs.code == 'true'
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
Expand Down Expand Up @@ -80,9 +102,11 @@ jobs:
run: |
conda activate test-environment
codecov

ui_test_suite:
name: UI tests on Python ${{ matrix.python-version }}, ${{ matrix.os }}
needs: [pre_commit]
needs: [pre_commit, changes]
if: needs.changes.outputs.code == 'true'
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
Expand Down Expand Up @@ -124,9 +148,11 @@ jobs:
files: ./coverage.xml
flags: ui-tests
fail_ci_if_error: false # optional (default = false)

core_test_suite:
name: Core tests on Python ${{ matrix.python-version }}, ${{ matrix.os }}
needs: [pre_commit]
needs: [pre_commit, changes]
if: needs.changes.outputs.code == 'true'
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
Expand Down