-
Notifications
You must be signed in to change notification settings - Fork 0
72 lines (69 loc) · 2.05 KB
/
frontend-tests.yml
File metadata and controls
72 lines (69 loc) · 2.05 KB
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
# Publicly credit Sauce Labs because they generously support open source
# projects.
name: Frontend Tests
on:
workflow_call:
jobs:
test-frontend:
runs-on: ubuntu-latest
steps:
-
name: Check out Etherpad core
uses: actions/checkout@v6
with:
repository: ether/etherpad-lite
path: etherpad-lite
- uses: actions/setup-node@v6
name: Install Node.js
with:
node-version: 25
- uses: pnpm/action-setup@v6
name: Install pnpm
with:
version: 10
run_install: false
- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- uses: actions/cache@v5
name: Setup pnpm cache
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
-
name: Checkout plugin repository
uses: actions/checkout@v6
with:
path: plugin
-
name: Install Etherpad core dependencies
working-directory: ./etherpad-lite
run: bin/installDeps.sh
- name: Install plugin
working-directory: ./etherpad-lite
run: |
pnpm run plugins i --path ../../plugin
- name: Create settings.json
working-directory: ./etherpad-lite
run: cp ./src/tests/settings.json settings.json
- name: Run the frontend tests
working-directory: ./etherpad-lite
shell: bash
run: |
pnpm run dev &
connected=false
can_connect() {
curl -sSfo /dev/null http://localhost:9001/ || return 1
connected=true
}
now() { date +%s; }
start=$(now)
while [ $(($(now) - $start)) -le 30 ] && ! can_connect; do
sleep 1
done
cd src
pnpm exec playwright install chromium --with-deps
pnpm run test-ui --project=chromium