Skip to content

Commit

Permalink
Add skip statement to all steps to work with required (#6037)
Browse files Browse the repository at this point in the history
  • Loading branch information
hoxbro authored Dec 16, 2023
1 parent efed87d commit 804d56b
Showing 1 changed file with 33 additions and 27 deletions.
60 changes: 33 additions & 27 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,19 @@ on:
- main
pull_request:
branches:
- '*'
- "*"
workflow_dispatch:
schedule:
- cron: '0 14 * * SUN'
- cron: "0 14 * * SUN"

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

defaults:
run:
shell: bash -el {0}

env:
SETUPTOOLS_ENABLE_FEATURES: "legacy-editable"
DISPLAY: ":99.0"
Expand All @@ -30,9 +34,9 @@ env:
jobs:
pre_commit:
name: Run pre-commit
runs-on: 'ubuntu-latest'
runs-on: "ubuntu-latest"
steps:
- uses: holoviz-dev/holoviz_tasks/pre-commit@v0.1a17
- uses: holoviz-dev/holoviz_tasks/pre-commit@v0.1a19

changes:
name: Check for code changes
Expand All @@ -58,25 +62,22 @@ jobs:
unit_test_suite:
name: Unit tests on Python ${{ matrix.python-version }}, ${{ matrix.os }}
needs: [pre_commit, changes]
if: needs.changes.outputs.code == 'true'
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: ['ubuntu-latest', 'macos-latest', 'windows-latest']
python-version: ['3.9', '3.11']
os: ["ubuntu-latest", "macos-latest", "windows-latest"]
python-version: ["3.9", "3.11"]
include:
- os: 'ubuntu-latest'
python-version: '3.10'
- os: "ubuntu-latest"
python-version: "3.10"
timeout-minutes: 120
defaults:
run:
shell: bash -el {0}
env:
DESC: "Python ${{ matrix.python-version }}, ${{ matrix.os }} unit tests"
PYTHON_VERSION: ${{ matrix.python-version }}
steps:
- uses: holoviz-dev/holoviz_tasks/[email protected]
- uses: holoviz-dev/holoviz_tasks/[email protected]
if: needs.changes.outputs.code == 'true'
with:
name: unit_test_suite
python-version: ${{ matrix.python-version }}
Expand All @@ -87,36 +88,36 @@ jobs:
conda-update: true
id: install
- name: bokeh sampledata
if: needs.changes.outputs.code == 'true'
run: |
conda activate test-environment
bokeh sampledata
- name: doit test_unit
if: needs.changes.outputs.code == 'true'
run: |
conda activate test-environment
doit test_unit
- name: test examples
if: needs.changes.outputs.code == 'true'
run: |
conda activate test-environment
doit test_examples
- name: codecov
if: needs.changes.outputs.code == 'true'
run: |
conda activate test-environment
codecov
ui_test_suite:
name: UI tests on Python ${{ matrix.python-version }}, ${{ matrix.os }}
needs: [pre_commit, changes]
if: needs.changes.outputs.code == 'true'
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: ['ubuntu-latest']
python-version: ['3.9']
os: ["ubuntu-latest"]
python-version: ["3.9"]
timeout-minutes: 60
defaults:
run:
shell: bash -el {0}
env:
DESC: "Python ${{ matrix.python-version }}, ${{ matrix.os }} UI tests"
PANEL_LOG_LEVEL: info
Expand All @@ -125,7 +126,8 @@ jobs:
# it as one of the sources.
PYCTDEV_SELF_CHANNEL: "pyviz/label/dev"
steps:
- uses: holoviz-dev/holoviz_tasks/[email protected]
- uses: holoviz-dev/holoviz_tasks/[email protected]
if: needs.changes.outputs.code == 'true'
with:
name: ui_test_suite
python-version: ${{ matrix.python-version }}
Expand All @@ -139,10 +141,12 @@ jobs:
conda activate test-environment
doit env_capture
- name: doit test_ui
if: needs.changes.outputs.code == 'true'
run: |
conda activate test-environment
doit test_ui
- name: Upload coverage to Codecov
if: needs.changes.outputs.code == 'true'
uses: codecov/codecov-action@v3
with:
files: ./coverage.xml
Expand All @@ -152,23 +156,20 @@ jobs:
core_test_suite:
name: Core tests on Python ${{ matrix.python-version }}, ${{ matrix.os }}
needs: [pre_commit, changes]
if: needs.changes.outputs.code == 'true'
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: ['ubuntu-latest']
python-version: ['3.12']
os: ["ubuntu-latest"]
python-version: ["3.12"]
timeout-minutes: 120
defaults:
run:
shell: bash -el {0}
env:
DESC: "Python ${{ matrix.python-version }}, ${{ matrix.os }} core tests"
PYTHON_VERSION: ${{ matrix.python-version }}
steps:
# Add back when this works on Python 3.12
# - uses: holoviz-dev/holoviz_tasks/[email protected]
# - uses: holoviz-dev/holoviz_tasks/[email protected]
# if: needs.changes.outputs.code == 'true'
# with:
# name: core_test_suite
# python-version: ${{ matrix.python-version }}
Expand All @@ -182,21 +183,26 @@ jobs:
with:
fetch-depth: "100"
- name: Fetch unshallow
if: needs.changes.outputs.code == 'true'
run: git fetch --prune --tags --unshallow -f
- uses: actions/setup-python@v4
if: needs.changes.outputs.code == 'true'
with:
python-version: 3.12
- run: |
python -m pip install -ve '.[tests_core, tests_ci]'
- name: bokeh sampledata
if: needs.changes.outputs.code == 'true'
run: |
# conda activate test-environment
bokeh sampledata
- name: Check packages latest version
if: needs.changes.outputs.code == 'true'
run: |
# conda activate test-environment
python scripts/check_latest_packages.py
- name: doit test_unit
if: needs.changes.outputs.code == 'true'
run: |
# conda activate test-environment
pytest holoviews

0 comments on commit 804d56b

Please sign in to comment.