-
-
Notifications
You must be signed in to change notification settings - Fork 531
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ef083b5
commit 3396a5e
Showing
107 changed files
with
1,645 additions
and
412 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,6 +8,19 @@ on: | |
branches: | ||
- '*' | ||
workflow_dispatch: | ||
inputs: | ||
target: | ||
description: "How much of the test suite to run" | ||
type: choice | ||
default: default | ||
options: | ||
- default | ||
- full | ||
- downstream | ||
cache: | ||
description: "Use cache" | ||
type: boolean | ||
default: true | ||
schedule: | ||
- cron: '0 19 * * SUN' | ||
|
||
|
@@ -21,16 +34,82 @@ 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 }} | ||
doc_change: ${{ steps.filter.outputs.doc }} | ||
matrix: ${{ env.MATRIX }} | ||
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/**' | ||
- 'setup.py' | ||
- 'pyproject.toml' | ||
- 'tox.ini' | ||
- '.github/workflows/test.yaml' | ||
doc: | ||
- 'doc/getting_started/**' | ||
- 'doc/how_to/**' | ||
- 'scripts/**' | ||
- name: Set matrix option | ||
run: | | ||
if [[ '${{ github.event_name }}' == 'workflow_dispatch' ]]; then | ||
OPTION=${{ github.event.inputs.target }} | ||
elif [[ '${{ github.event_name }}' == 'schedule' ]]; then | ||
OPTION="full" | ||
elif [[ '${{ github.event_name }}' == 'push' && '${{ github.ref_type }}' == 'tag' ]]; then | ||
OPTION="full" | ||
else | ||
OPTION="default" | ||
fi | ||
echo "MATRIX_OPTION=$OPTION" >> $GITHUB_ENV | ||
- name: Set test matrix with 'default' option | ||
if: env.MATRIX_OPTION == 'default' | ||
run: | | ||
MATRIX=$(jq -nsc '{ | ||
"os": ["ubuntu-latest", "macos-latest", "windows-latest"], | ||
"python-version": ["3.9", "3.11"], | ||
"include": [ | ||
{"os": "ubuntu-latest", "python-version": "3.10"} | ||
] | ||
}') | ||
echo "MATRIX=$MATRIX" >> $GITHUB_ENV | ||
- name: Set test matrix with 'full' option | ||
if: env.MATRIX_OPTION == 'full' | ||
run: | | ||
MATRIX=$(jq -nsc '{ | ||
"os": ["ubuntu-latest", "macos-latest", "windows-latest"], | ||
"python-version": ["3.9", "3.10", "3.11"] | ||
}') | ||
echo "MATRIX=$MATRIX" >> $GITHUB_ENV | ||
- name: Set test matrix with 'downstream' option | ||
if: env.MATRIX_OPTION == 'downstream' | ||
run: | | ||
MATRIX=$(jq -nsc '{ | ||
"os": ["ubuntu-latest"], | ||
"python-version": ["3.11"] | ||
}') | ||
echo "MATRIX=$MATRIX" >> $GITHUB_ENV | ||
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: | ||
os: ['ubuntu-latest', 'macos-latest', 'windows-latest'] | ||
# Run on the full set on schedule, workflow_dispatch and push&tags events, otherwise on a subset. | ||
python-version: ${{ ( github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' || ( github.event_name == 'push' && github.ref_type == 'tag' ) ) && fromJSON('["3.9", "3.10", "3.11"]') || fromJSON('["3.9", "3.11"]') }} | ||
matrix: ${{ fromJson(needs.setup.outputs.matrix) }} | ||
timeout-minutes: 90 | ||
defaults: | ||
run: | ||
|
@@ -56,7 +135,7 @@ jobs: | |
conda-update: true | ||
nodejs: true | ||
envs: -o examples -o recommended -o tests -o build | ||
cache: true | ||
cache: ${{ github.event.inputs.cache || github.event.inputs.cache == '' }} | ||
opengl: true | ||
id: install | ||
- name: doit develop_install | ||
|
@@ -98,8 +177,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' || needs.setup.outputs.doc_change == 'true' | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
|
@@ -144,7 +224,7 @@ jobs: | |
python-version: 3.9 | ||
channels: pyviz/label/dev,bokeh,conda-forge,nodefaults | ||
envs: "-o recommended -o tests -o build" | ||
cache: true | ||
cache: ${{ github.event.inputs.cache || github.event.inputs.cache == '' }} | ||
nodejs: true | ||
playwright: true | ||
id: install | ||
|
@@ -199,8 +279,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: | ||
|
@@ -223,7 +304,7 @@ jobs: | |
# # channel-priority: strict | ||
# channels: pyviz/label/dev,conda-forge,nodefaults | ||
# envs: "-o tests_core -o tests_ci" | ||
# cache: true | ||
# cache: ${{ github.event.inputs.cache || github.event.inputs.cache == '' }} | ||
# conda-update: true | ||
# id: install | ||
- uses: actions/checkout@v3 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.