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 if code changes #6096

Merged
merged 6 commits into from
Dec 27, 2023
Merged
Changes from 2 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
31 changes: 28 additions & 3 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,33 @@ jobs:
runs-on: 'ubuntu-latest'
steps:
- uses: holoviz-dev/holoviz_tasks/[email protected]
setup:
name: Setup workflow
runs-on: ubuntu-latest
permissions:
pull-requests: read
outputs:
code_change: ${{ steps.filter.outputs.code }}
steps:
- uses: actions/checkout@v3
if: github.event_name != 'pull_request'
- name: Check for code changes
uses: dorny/[email protected]
id: filter
with:
filters: |
code:
- 'panel/**'
- 'examples/**'
- 'scripts/**'
- 'setup.py'
- 'pyproject.toml'
- '.github/workflows/test.yaml'
unit_test_suite:
name: Unit tests on ${{ matrix.os }} with Python ${{ matrix.python-version }}
needs: [pre_commit]
needs: [pre_commit, setup]
runs-on: ${{ matrix.os }}
if: needs.setup.outputs.code_change == 'true'
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -98,8 +121,9 @@ jobs:
fail_ci_if_error: false # optional (default = false)
ui_test_suite:
name: UI tests on ${{ matrix.os }} with Python 3.9
needs: [pre_commit]
needs: [pre_commit, setup]
runs-on: ${{ matrix.os }}
if: needs.setup.outputs.code_change == 'true'
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -199,8 +223,9 @@ jobs:
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, setup]
runs-on: ${{ matrix.os }}
if: needs.setup.outputs.code_change == 'true'
strategy:
fail-fast: false
matrix:
Expand Down
Loading