Skip to content

Commit 243c4fe

Browse files
authored
Add bail option to GUI test (#309)
1 parent 56c2789 commit 243c4fe

File tree

5 files changed

+37
-28
lines changed

5 files changed

+37
-28
lines changed

.dockerignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
node_modules

.github/workflows/gh-pages.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ on:
99
- '.eslintrc.json'
1010
- '.gitignore'
1111
- '.prettierrc.json'
12+
- 'Dockerfile*'
1213
- 'docker-compose.yml'
1314
- 'LICENSE'
1415
- 'package.json'
@@ -35,7 +36,7 @@ jobs:
3536
steps:
3637
- uses: actions/checkout@v2
3738
- name: Test GUI
38-
run: docker-compose run --rm test-gui
39+
run: docker-compose run --rm test-gui --bail
3940
deploy:
4041
runs-on: ubuntu-latest
4142
needs: [test-lib, test-gui]

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,4 @@ jobs:
2121
steps:
2222
- uses: actions/checkout@v2
2323
- name: Test GUI
24-
run: docker-compose run --rm test-gui
24+
run: docker-compose run --rm test-gui --bail

Dockerfile_guitest

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
FROM node:18.7-slim
2+
3+
RUN apt-get update \
4+
&& apt-get install -y \
5+
libasound2 \
6+
libatk1.0-0 \
7+
libatk-bridge2.0-0 \
8+
libcups2 \
9+
libdrm2 \
10+
libgbm-dev \
11+
libnss3 \
12+
libpangocairo-1.0-0 \
13+
libxcomposite1 \
14+
libxdamage1 \
15+
libxfixes3 \
16+
libxkbcommon0 \
17+
libxrandr2 \
18+
&& apt-get clean \
19+
&& rm -rf /var/lib/apt/lists/*
20+
RUN mkdir /app
21+
22+
ADD package.json /app
23+
ADD yarn.lock /app
24+
WORKDIR /app
25+
26+
RUN yarn && yarn cache clean
27+
28+
ENTRYPOINT ["yarn", "test:gui"]

docker-compose.yml

Lines changed: 5 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -2,39 +2,18 @@ version: '3'
22

33
services:
44
test-gui:
5-
image: node:16
5+
build:
6+
context: .
7+
dockerfile: Dockerfile_guitest
68
depends_on:
79
- server
810
environment:
911
- SERVER_HOST=server
1012
volumes:
11-
- .:/app
12-
- server_node_modules:/app/node_modules
13+
- ./tests:/app/tests
1314
working_dir: /app
14-
entrypoint:
15-
- bash
16-
- -c
17-
- "apt-get update
18-
&& apt-get install -y
19-
libasound2
20-
libatk1.0-0
21-
libatk-bridge2.0-0
22-
libcups2
23-
libdrm2
24-
libgbm-dev
25-
libnss3
26-
libxcomposite1
27-
libxdamage1
28-
libxkbcommon0
29-
libxrandr2
30-
&& yarn
31-
&& yarn test:gui"
3215

3316
server:
34-
image: nginx:1.21.5-alpine
17+
image: nginx:1.22.0-alpine
3518
volumes:
3619
- .:/usr/share/nginx/html
37-
38-
volumes:
39-
server_node_modules:
40-
driver: local

0 commit comments

Comments
 (0)