-
-
Notifications
You must be signed in to change notification settings - Fork 4
213 lines (197 loc) · 5.99 KB
/
playwright.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
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
name: Playwright e2e tests
on:
pull_request:
branches: [master]
workflow_run:
workflows: ['Prettier and linter']
types:
- completed
concurrency:
group: ${{ github.head_ref }}
cancel-in-progress: true
jobs:
neo4j-movies:
timeout-minutes: 60
runs-on: ubuntu-latest
services:
neo4j:
image: neo4j:latest
env:
NEO4J_AUTH: neo4j/nothing123
ports:
- 7687:7687
- 7474:7474
options: >-
--health-cmd "wget http://localhost:7474 || exit 1"
steps:
# - name: Install Cypher Shell (Debian Package)
# run: |
# wget -nv https://dist.neo4j.org/cypher-shell/cypher-shell_5.19.0_all.deb
# sudo apt-get update
# sudo apt-get install -y ./cypher-shell_5.19.0_all.deb
- name: Get movies dataset
run: |
wget -O movies.cypher https://raw.githubusercontent.com/neo4j-graph-examples/movies/main/scripts/movies.cypher
# cypher-shell -a neo4j://neo4j:7687 -u "neo4j" -p "nothing123" "MATCH (n) DETACH DELETE n"
# cypher-shell -a neo4j://neo4j:7687 -u "neo4j" -p "nothing123" -f movies.cypher
# Execute cypher-shell directly from the container:
docker exec neo4j cypher-shell \
-a neo4j://neo4j:7687 -u "neo4j" -p "nothing123" \
"MATCH (n) DETACH DELETE n"
docker exec neo4j cypher-shell \
-a neo4j://neo4j:7687 -u "neo4j" -p "nothing123" \
-f movies.cypher
neo4j-read:
needs: neo4j-movies
timeout-minutes: 60
runs-on: ubuntu-latest
container:
image: mcr.microsoft.com/playwright:v1.44.0-jammy
strategy:
fail-fast: false
matrix:
shardIndex: [1, 2, 3, 4, 5, 6, 7, 8]
shardTotal: [8]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: latest
- name: Install dependencies
run: npm ci
- name: Install Playwright Browsers
run: npx playwright install --with-deps chromium
- name: Run Playwright tests (neo4j-read)
run: npx playwright test --grep @neo4j-read --shard=${{ matrix.shardIndex }}/${{ matrix.shardTotal }}
env:
DB_HOSTNAME: 'bolt://neo4j:7687'
DB_USERNAME: 'neo4j'
DB_PASSWORD: 'nothing123'
build:
timeout-minutes: 60
runs-on: ubuntu-latest
container:
image: mcr.microsoft.com/playwright:v1.44.0-jammy
services:
neo4j:
image: neo4j:latest
env:
NEO4J_AUTH: neo4j/nothing123
ports:
- 7687:7687
- 7474:7474
options: >-
--health-cmd "wget http://localhost:7474 || exit 1"
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: latest
- name: Install dependencies
run: npm ci
- name: Install Playwright Browsers
run: npx playwright install --with-deps chromium
- name: Build
run: npm run build
- name: Run Playwright tests (build)
run: npx playwright test --grep @build
env:
DB_HOSTNAME: 'bolt://neo4j:7687'
DB_USERNAME: 'neo4j'
DB_PASSWORD: 'nothing123'
neo4j-write:
timeout-minutes: 60
runs-on: ubuntu-latest
container:
image: mcr.microsoft.com/playwright:v1.44.0-jammy
services:
neo4j:
image: neo4j:latest
env:
NEO4J_AUTH: neo4j/nothing123
ports:
- 7687:7687
- 7474:7474
options: >-
--health-cmd "wget http://localhost:7474 || exit 1"
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: latest
- name: Install dependencies
run: npm ci
- name: Install Playwright Browsers
run: npx playwright install --with-deps chromium
- name: Run Playwright tests (neo4j-write)
run: npx playwright test --grep @neo4j-write
env:
DB_HOSTNAME: 'bolt://neo4j:7687'
DB_USERNAME: 'neo4j'
DB_PASSWORD: 'nothing123'
neo4j-multidb:
timeout-minutes: 60
runs-on: ubuntu-latest
container:
image: mcr.microsoft.com/playwright:v1.44.0-jammy
services:
neo4j:
image: neo4j:enterprise
env:
NEO4J_AUTH: neo4j/nothing123
NEO4J_ACCEPT_LICENSE_AGREEMENT: yes
ports:
- 7687:7687
- 7474:7474
options: >-
--health-cmd "wget http://localhost:7474 || exit 1"
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: latest
- name: Install dependencies
run: npm ci
- name: Install Playwright Browsers
run: npx playwright install --with-deps chromium
- name: Run Playwright tests (neo4j-multidb)
run: npx playwright test --grep @neo4j-multidb
env:
DB_HOSTNAME: 'bolt://neo4j:7687'
DB_USERNAME: 'neo4j'
DB_PASSWORD: 'nothing123'
memgraph:
timeout-minutes: 60
runs-on: ubuntu-latest
container:
image: mcr.microsoft.com/playwright:v1.44.0-jammy
services:
memgraph:
image: memgraph/memgraph:latest
ports:
- 7687:7687
options: >-
--health-cmd "echo 'RETURN 0;' | mgconsole || exit 1"
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: latest
- name: Install dependencies
run: npm ci
- name: Install Playwright Browsers
run: npx playwright install --with-deps chromium
- name: Run Playwright tests (memgraph)
run: npx playwright test --grep @memgraph
env:
DB_HOSTNAME: 'bolt://memgraph:7687'