Skip to content

Commit 303646f

Browse files
authored
Add nightwatch tests (#481)
1 parent 9875fba commit 303646f

File tree

10 files changed

+159
-0
lines changed

10 files changed

+159
-0
lines changed

.github/workflows/cypress.yml

+2
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,13 @@ on:
77
push:
88
paths:
99
- 'cypress/**'
10+
- '.github/workflows/cypress.yml'
1011
branches:
1112
- main
1213
pull_request:
1314
paths:
1415
- 'cypress/**'
16+
- '.github/workflows/cypress.yml'
1517
branches:
1618
- main
1719

.github/workflows/dotnet.yml

+2
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,13 @@ on:
77
push:
88
paths:
99
- 'dotnet-*/**'
10+
- '.github/workflows/dotnet.yml'
1011
branches:
1112
- main
1213
pull_request:
1314
paths:
1415
- 'dotnet-*/**'
16+
- '.github/workflows/dotnet.yml'
1517
branches:
1618
- main
1719

.github/workflows/java.yml

+2
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,13 @@ on:
77
push:
88
paths:
99
- 'wd-java*/**'
10+
- '.github/workflows/java.yml'
1011
branches:
1112
- main
1213
pull_request:
1314
paths:
1415
- 'wd-java*/**'
16+
- '.github/workflows/java.yml'
1517
branches:
1618
- main
1719

.github/workflows/nightwatch.yml

+67
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
2+
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs
3+
4+
name: Nigthwatch Tests
5+
6+
on:
7+
push:
8+
paths:
9+
- 'nigthwatch*/**'
10+
- '.github/workflows/nightwatch.yml'
11+
branches:
12+
- main
13+
pull_request:
14+
paths:
15+
- 'nigthwatch*/**'
16+
- '.github/workflows/nightwatch.yml'
17+
branches:
18+
- main
19+
20+
concurrency:
21+
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
22+
cancel-in-progress: true
23+
24+
jobs:
25+
cucumber:
26+
runs-on: ubuntu-latest
27+
steps:
28+
- name: Checkout code
29+
uses: actions/checkout@v4
30+
31+
- name: Run nightwatch example
32+
uses: docker/build-push-action@v4
33+
with:
34+
context: ./nightwatch/cucumberjs
35+
file: ./nightwatch/cucumberjs/Dockerfile
36+
push: false
37+
secrets: |
38+
"dotenv=${{ secrets.DOTENV }}"
39+
default:
40+
runs-on: ubuntu-latest
41+
steps:
42+
- name: Checkout code
43+
uses: actions/checkout@v4
44+
45+
- name: Run nightwatch example
46+
uses: docker/build-push-action@v4
47+
with:
48+
context: ./nightwatch/default
49+
file: ./nightwatch/default/Dockerfile
50+
push: false
51+
secrets: |
52+
"dotenv=${{ secrets.DOTENV }}"
53+
54+
mocha:
55+
runs-on: ubuntu-latest
56+
steps:
57+
- name: Checkout code
58+
uses: actions/checkout@v4
59+
60+
- name: Run nightwatch example
61+
uses: docker/build-push-action@v4
62+
with:
63+
context: ./nightwatch/mocha
64+
file: ./nightwatch/mocha/Dockerfile
65+
push: false
66+
secrets: |
67+
"dotenv=${{ secrets.DOTENV }}"

.github/workflows/storybook.yml

+2
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,13 @@ on:
77
push:
88
paths:
99
- 'storybook*/**'
10+
- '.github/workflows/storybook.yml'
1011
branches:
1112
- main
1213
pull_request:
1314
paths:
1415
- 'storybook*/**'
16+
- '.github/workflows/storybook.yml'
1517
branches:
1618
- main
1719

.github/workflows/wdio.yml

+2
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,13 @@ on:
77
push:
88
paths:
99
- 'wdio*/**'
10+
- '.github/workflows/wdio.yml'
1011
branches:
1112
- main
1213
pull_request:
1314
paths:
1415
- 'wdio*/**'
16+
- '.github/workflows/wdio.yml'
1517
branches:
1618
- main
1719

nightwatch/cucumberjs/Dockerfile

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
FROM ubuntu:22.04 as amd64
2+
3+
RUN apt-get update && apt-get install -y curl
4+
5+
# Install runme
6+
RUN curl -sSL https://download.stateful.com/runme/1.2.6/runme_linux_x86_64.tar.gz | tar -xz -C /usr/local/bin runme
7+
RUN runme --version
8+
9+
FROM ubuntu:22.04 as arm64
10+
11+
RUN apt-get update && apt-get install -y curl
12+
13+
# Install runme
14+
RUN curl -sSL https://download.stateful.com/runme/1.2.6/runme_linux_arm64.tar.gz | tar -xz -C /usr/local/bin runme
15+
RUN runme --version
16+
17+
FROM ${TARGETARCH}
18+
19+
RUN mkdir -p /workspace
20+
WORKDIR /workspace
21+
22+
COPY . .
23+
24+
RUN runme run nodejs-linux
25+
RUN runme run npm-install
26+
RUN --mount=type=secret,id=dotenv,target=/workspace/.env runme run npm-run
27+
RUN --mount=type=secret,id=dotenv,target=/workspace/.env runme run npm-run-modified

nightwatch/cucumberjs/nightwatch.conf.js

+1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
// \_| \_/|_| \__, ||_| |_| \__| \_/\_/ \__,_| \__| \___||_| |_|
1111
// __/ |
1212
// |___/
13+
require('dotenv').config();
1314

1415
module.exports = {
1516
// An array of folders (excluding subfolders) where your tests are located;

nightwatch/default/Dockerfile

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
FROM ubuntu:22.04 as amd64
2+
3+
RUN apt-get update && apt-get install -y curl
4+
5+
# Install runme
6+
RUN curl -sSL https://download.stateful.com/runme/1.2.6/runme_linux_x86_64.tar.gz | tar -xz -C /usr/local/bin runme
7+
RUN runme --version
8+
9+
FROM ubuntu:22.04 as arm64
10+
11+
RUN apt-get update && apt-get install -y curl
12+
13+
# Install runme
14+
RUN curl -sSL https://download.stateful.com/runme/1.2.6/runme_linux_arm64.tar.gz | tar -xz -C /usr/local/bin runme
15+
RUN runme --version
16+
17+
FROM ${TARGETARCH}
18+
19+
RUN mkdir -p /workspace
20+
WORKDIR /workspace
21+
22+
COPY . .
23+
24+
RUN runme run nodejs-linux
25+
RUN runme run npm-install
26+
RUN --mount=type=secret,id=dotenv,target=/workspace/.env runme run npm-run
27+
RUN --mount=type=secret,id=dotenv,target=/workspace/.env runme run npm-run-modified

nightwatch/mocha/Dockerfile

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
FROM ubuntu:22.04 as amd64
2+
3+
RUN apt-get update && apt-get install -y curl
4+
5+
# Install runme
6+
RUN curl -sSL https://download.stateful.com/runme/1.2.6/runme_linux_x86_64.tar.gz | tar -xz -C /usr/local/bin runme
7+
RUN runme --version
8+
9+
FROM ubuntu:22.04 as arm64
10+
11+
RUN apt-get update && apt-get install -y curl
12+
13+
# Install runme
14+
RUN curl -sSL https://download.stateful.com/runme/1.2.6/runme_linux_arm64.tar.gz | tar -xz -C /usr/local/bin runme
15+
RUN runme --version
16+
17+
FROM ${TARGETARCH}
18+
19+
RUN mkdir -p /workspace
20+
WORKDIR /workspace
21+
22+
COPY . .
23+
24+
RUN runme run nodejs-linux
25+
RUN runme run npm-install
26+
RUN --mount=type=secret,id=dotenv,target=/workspace/.env runme run npm-run
27+
RUN --mount=type=secret,id=dotenv,target=/workspace/.env runme run npm-run-modified

0 commit comments

Comments
 (0)