-
-
Notifications
You must be signed in to change notification settings - Fork 128
145 lines (123 loc) · 3.91 KB
/
tests.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
138
139
140
141
142
143
144
145
name: Tests
on:
push:
branches: [main]
pull_request:
jobs:
test:
name: JS
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
browser: [chrome-headless, firefox-headless, webkit-headless]
exclude:
# Playwright webkit binary is not compatible with ubuntu
- os: ubuntu-latest
browser: webkit-headless
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
- name: Install dependencies
shell: bash
run: |
set -eux
npm install -g yarn
yarn
- name: Build Source
shell: bash
run: |
set -eux
yarn build
yarn build:test
- name: Run Tests
run: |
yarn run test:${{ matrix.browser }}
build:
runs-on: ubuntu-latest
env:
PLAYWRIGHT_BROWSERS_PATH: ${{ github.workspace }}/pw-browsers
steps:
- uses: actions/checkout@v4
- uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
- name: Set up browser cache
uses: actions/cache@v4
with:
path: |
${{ github.workspace }}/pw-browsers
key: ubuntu-latest-${{ hashFiles('./yarn.lock') }}
- name: Install dependencies
shell: bash
run: |
set -eux
npm install -g yarn
yarn
- name: Check linters
shell: bash
run: |
set -eux
yarn lint:check
- name: Build Source
shell: bash
run: |
set -eux
yarn build
yarn build:test
- name: Test Examples
shell: bash
run: |
set -eux
yarn minimize
yarn build:examples
# Install playwright for example tests
npx playwright install chromium
yarn test:examples
- name: Build Docs
run: |
set -eux
yarn clean
yarn build:src
yarn docs
- name: Publish with Verdaccio
run: |
set -eux
npm install -g verdaccio
verdaccio --config .github/scripts/verdaccio.yml &
npm set registry http://localhost:4873/
yarn config set npmRegistryServer http://localhost:4873/
yarn config set unsafeHttpWhitelist --json '["localhost"]'
git config --global user.email "[email protected]"
git config --global user.name "Your Name"
yarn run update:versions patch --yes
git commit -a -m "Update versions"
yarn run publish
yarn config unset npmRegistryServer
yarn config unset unsafeHttpWhitelist
check_links:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
- uses: jupyterlab/maintainer-tools/.github/actions/check-links@v1
with:
ignore_links: "./api/index.html examples/accordionpanel/index.html examples/datagrid/index.html examples/dockpanel/index.html examples/menubar/index.html https://mybinder.org/v2/gh/jupyterlab/lumino/.*"
check_release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Bump artificially the top version
shell: python
run: |
import json
from datetime import datetime
with open("package.json") as f:
data = json.load(f)
data["version"] = datetime.now().strftime("%Y.%m.%d")
data["jupyter-releaser"] = { "options": { "version-cmd": "npm run update:versions -- --yes" } }
with open("package.json", "w") as f:
data = json.dump(data, f)
- name: Check Release
uses: jupyter-server/jupyter_releaser/.github/actions/check-release@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}