Skip to content

[pre-commit.ci] pre-commit autoupdate #132

[pre-commit.ci] pre-commit autoupdate

[pre-commit.ci] pre-commit autoupdate #132

name: Run accessibility tests on JupyterLab
on:
push:
branches:
- main
pull_request:
branches:
- main
# calling from another workflow - for example from a workflow in the JLab repo
workflow_call:
inputs:
repository:
description: The JupyterLab repository or fork with owner, for example jupyterlab/jupyterlab.
type: string
required: true
default: "jupyterlab/jupyterlab"
ref:
description: The Jupyterlab repository's branch, tag, or SHA to checkout.
type: string
required: true
default: "main"
test_project:
description: |
Leave blank to run the full test suite, or enter a Playwright project
name (such as "regression") to run a part of the test suite.
type: string
required: false
external_pkg_repo:
description: |
External package repository to link, for example jupyterlab/lumino
only to be used if you want to link and test a package against JupyterLab.
Otherwise leave blank.
type: string
required: false
default: ""
external_pkg_ref:
description: |
External package repository's ref (branch, tag or SHA) to checkout,
only to be used if you want to link and test a package against JupyterLab.
Otherwise leave blank.
type: string
required: false
default: ""
# enable manual runs for the workflow
workflow_dispatch:
inputs:
repository:
description: The JupyterLab repository or fork with owner, for example jupyterlab/jupyterlab.
required: false
default: "jupyterlab/jupyterlab"
ref:
description: The branch, tag, or SHA to checkout.
required: false
default: "main"
test_project:
description: |
Leave blank to run the full test suite, or enter a Playwright project
name (such as "regression") to run a part of the test suite.
required: false
external_pkg_repo:
description: |
External package repository to link, for example jupyterlab/lumino
only to be used if you want to link and test a package against JupyterLab.
Otherwise leave blank.
type: string
required: false
default: ""
external_pkg_ref:
description: |
External package repository's ref (branch, tag or SHA) to checkout,
only to be used if you want to link and test a package against JupyterLab.
Otherwise leave blank.
type: string
required: false
default: ""
# https://docs.github.com/en/actions/using-jobs/using-concurrency
concurrency:
# only cancel in-progress jobs or runs for the current workflow - matches against branch & tags
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
FORCE_COLOR: "1" # Make tools pretty.
jobs:
print-info:
runs-on: ubuntu-latest
steps:
- run: |
echo "::group::Printing variables 🖨"
echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event"
echo "🐧 This job is now running on a ${{ runner.os }} server hosted by GitHub"
echo "🔎 The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}"
echo "🗂 Workspace is ${{ github.workspace }}"
echo "inputs.repository = ${{ inputs.repository }}"
echo "inputs.ref = ${{ inputs.ref }}"
echo "github.workspace = ${{ github.workspace }}"
echo "github.sha = ${{ github.sha }}"
echo "github.repository = ${{ github.repository }}"
echo "github.server_url = ${{ github.server_url }}"
echo "::endgroup::"
accessibility-test-jupyterlab:
runs-on: ubuntu-latest
steps:
# We have to check out the repo in order to locally reference the action,
# i.e., .github/actions/...
- name: Check out testing repository 🛎
uses: actions/checkout@v3
- name: Log action details in the summary 📝
run: |
step_summary=$(cat <<EOF
# JupyterLab accessibility tests ♿️
## Tests execution details 🗂
- Workflow trigger: \`${{ github.event_name }}\`
- \`ref\`: \`${{ github.ref }}\`
- JupyterLab repository: [${{ github.event.inputs.repository || 'jupyterlab/jupyterlab' }}](https://github.com/${{ github.event.inputs.repository || 'jupyterlab/jupyterlab' }})
- JupyterLab \`ref\`: \`${{ github.event.inputs.ref || 'main' }}\`
EOF
)
echo "${step_summary}">> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY # adding a blank line for readability
- name: Run testing action ✅
uses: ./.github/actions/accessibility-test-jupyterlab
with:
repository: ${{ inputs.repository }}
ref: ${{ inputs.ref }}
test_project: ${{ inputs.test_project }}
external_pkg_repo: ${{ inputs.external_pkg_repo }}
external_pkg_ref: ${{ inputs.external_pkg_ref }}