-
Notifications
You must be signed in to change notification settings - Fork 3
137 lines (127 loc) · 5.06 KB
/
accessibility-test-jupyterlab.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
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 }}