diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 14a4b0b253..ccdcd0b808 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -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" @@ -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 @@ -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/install@v0.1a17 + - uses: holoviz-dev/holoviz_tasks/install@v0.1a19 + if: needs.changes.outputs.code == 'true' with: name: unit_test_suite python-version: ${{ matrix.python-version }} @@ -87,18 +88,22 @@ 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 @@ -106,17 +111,13 @@ jobs: 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 @@ -125,7 +126,8 @@ jobs: # it as one of the sources. PYCTDEV_SELF_CHANNEL: "pyviz/label/dev" steps: - - uses: holoviz-dev/holoviz_tasks/install@v0.1a17 + - uses: holoviz-dev/holoviz_tasks/install@v0.1a19 + if: needs.changes.outputs.code == 'true' with: name: ui_test_suite python-version: ${{ matrix.python-version }} @@ -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 @@ -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/install@v0.1a17 + # - uses: holoviz-dev/holoviz_tasks/install@v0.1a19 + # if: needs.changes.outputs.code == 'true' # with: # name: core_test_suite # python-version: ${{ matrix.python-version }} @@ -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