From 3c45b01743fc81ffc2b639ed7c4dcf7737bedfd3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20H=C3=B8xbro=20Hansen?= Date: Thu, 21 Dec 2023 08:35:51 +0100 Subject: [PATCH] Update namings --- .github/workflows/test.yaml | 59 +++++++++++++++++++------------------ 1 file changed, 30 insertions(+), 29 deletions(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index ee927157e0..dd15776eaa 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -46,18 +46,19 @@ jobs: steps: - uses: holoviz-dev/holoviz_tasks/pre-commit@v0.1a19 - changes: - name: Check for code changes + setup: + name: Setup workflow runs-on: ubuntu-latest permissions: pull-requests: read outputs: - code: ${{ steps.filter.outputs.code }} + code_change: ${{ steps.filter.outputs.code }} matrix: ${{ env.MATRIX }} steps: - uses: actions/checkout@v3 if: github.event_name != 'pull_request' - - uses: dorny/paths-filter@v2.11.1 + - name: Check for code changes + uses: dorny/paths-filter@v2.11.1 id: filter with: filters: | @@ -67,7 +68,7 @@ jobs: - 'setup.py' - 'pyproject.toml' - '.github/workflows/test.yaml' - - name: set matrix - default + - name: Set test matrix with 'default' option if: github.event_name != 'workflow_dispatch' || (github.event_name == 'workflow_dispatch' && github.event.inputs.target == 'default') run: | MATRIX=$(jq -nsc '{ @@ -75,13 +76,13 @@ jobs: "python-version": ["3.9", "3.11"], "include": [ { - "os": "windows-latest", - "python-version": "3.9" + "os": "ubuntu-latest", + "python-version": "3.10" } ] }') echo "MATRIX=$MATRIX" >> $GITHUB_ENV - - name: set matrix - full + - name: Set test matrix with 'full' option if: github.event_name == 'workflow_dispatch' && github.event.inputs.target == 'full' run: | MATRIX=$(jq -nsc '{ @@ -89,7 +90,7 @@ jobs: "python-version": ["3.9", "3.10", "3.11"] }') echo "MATRIX=$MATRIX" >> $GITHUB_ENV - - name: set matrix - downstream + - name: Set test matrix with 'downstream' option if: github.event_name == 'workflow_dispatch' && github.event.inputs.target == 'downstream' run: | MATRIX=$(jq -nsc '{ @@ -100,18 +101,18 @@ jobs: unit_test_suite: name: Unit tests on Python ${{ matrix.python-version }}, ${{ matrix.os }} - needs: [pre_commit, changes] + needs: [pre_commit, setup] runs-on: ${{ matrix.os }} strategy: fail-fast: false - matrix: ${{ fromJson(needs.changes.outputs.matrix) }} + matrix: ${{ fromJson(needs.setup.outputs.matrix) }} timeout-minutes: 120 env: DESC: "Python ${{ matrix.python-version }}, ${{ matrix.os }} unit tests" PYTHON_VERSION: ${{ matrix.python-version }} steps: - uses: holoviz-dev/holoviz_tasks/install@v0.1a19 - if: needs.changes.outputs.code == 'true' + if: needs.setup.outputs.code_change == 'true' with: name: unit_test_suite python-version: ${{ matrix.python-version }} @@ -122,29 +123,29 @@ jobs: conda-update: true id: install - name: bokeh sampledata - if: needs.changes.outputs.code == 'true' + if: needs.setup.outputs.code_change == 'true' run: | conda activate test-environment bokeh sampledata - name: doit test_unit - if: needs.changes.outputs.code == 'true' + if: needs.setup.outputs.code_change == 'true' run: | conda activate test-environment doit test_unit - name: test examples - if: needs.changes.outputs.code == 'true' + if: needs.setup.outputs.code_change == 'true' run: | conda activate test-environment doit test_examples - name: codecov - if: needs.changes.outputs.code == 'true' + if: needs.setup.outputs.code_change == 'true' run: | conda activate test-environment codecov ui_test_suite: name: UI tests on Python ${{ matrix.python-version }}, ${{ matrix.os }} - needs: [pre_commit, changes] + needs: [pre_commit, setup] runs-on: ${{ matrix.os }} strategy: fail-fast: false @@ -161,7 +162,7 @@ jobs: PYCTDEV_SELF_CHANNEL: "pyviz/label/dev" steps: - uses: holoviz-dev/holoviz_tasks/install@v0.1a19 - if: needs.changes.outputs.code == 'true' + if: needs.setup.outputs.code_change == 'true' with: name: ui_test_suite python-version: ${{ matrix.python-version }} @@ -171,12 +172,12 @@ jobs: playwright: true id: install - name: doit test_ui - if: needs.changes.outputs.code == 'true' + if: needs.setup.outputs.code_change == 'true' run: | conda activate test-environment doit test_ui - name: Upload coverage to Codecov - if: needs.changes.outputs.code == 'true' + if: needs.setup.outputs.code_change == 'true' uses: codecov/codecov-action@v3 with: files: ./coverage.xml @@ -185,7 +186,7 @@ jobs: core_test_suite: name: Core tests on Python ${{ matrix.python-version }}, ${{ matrix.os }} - needs: [pre_commit, changes] + needs: [pre_commit, setup] runs-on: ${{ matrix.os }} strategy: fail-fast: false @@ -199,7 +200,7 @@ jobs: steps: # Add back when this works on Python 3.12 # - uses: holoviz-dev/holoviz_tasks/install@v0.1a19 - # if: needs.changes.outputs.code == 'true' + # if: needs.setup.outputs.code_change == 'true' # with: # name: core_test_suite # python-version: ${{ matrix.python-version }} @@ -210,32 +211,32 @@ jobs: # conda-update: true # id: install - uses: actions/checkout@v3 - if: needs.changes.outputs.code == 'true' + if: needs.setup.outputs.code_change == 'true' with: fetch-depth: "100" - name: Fetch unshallow - if: needs.changes.outputs.code == 'true' + if: needs.setup.outputs.code_change == 'true' run: git fetch --prune --tags --unshallow -f - uses: actions/setup-python@v4 - if: needs.changes.outputs.code == 'true' + if: needs.setup.outputs.code_change == 'true' with: python-version: 3.12 - name: install - if: needs.changes.outputs.code == 'true' + if: needs.setup.outputs.code_change == 'true' run: | python -m pip install -ve '.[tests_core, tests_ci]' - name: bokeh sampledata - if: needs.changes.outputs.code == 'true' + if: needs.setup.outputs.code_change == 'true' run: | # conda activate test-environment bokeh sampledata - name: Check packages latest version - if: needs.changes.outputs.code == 'true' + if: needs.setup.outputs.code_change == 'true' run: | # conda activate test-environment python scripts/check_latest_packages.py - name: doit test_unit - if: needs.changes.outputs.code == 'true' + if: needs.setup.outputs.code_change == 'true' run: | # conda activate test-environment pytest holoviews