forked from josdejong/workerpool
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request josdejong#31 from accumatic/login_for_demo
Login for demo
- Loading branch information
Showing
96 changed files
with
11,053 additions
and
1,502 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
version: 2.1 | ||
|
||
orbs: | ||
docker: circleci/docker@1.0.0 | ||
|
||
jobs: | ||
e2e-tests: | ||
executor: docker/docker | ||
working_directory: ~/project | ||
|
||
steps: | ||
- checkout: | ||
path: ~/project | ||
- setup_remote_docker | ||
- run: | ||
name: Pull docker images | ||
command: docker-compose -f docker-compose.ci.yml pull | ||
no_output_timeout: 1m | ||
- run: | ||
name: Build docker images | ||
command: docker-compose -f docker-compose.ci.yml build | ||
no_output_timeout: 2m | ||
- run: | ||
name: Run tests | ||
command: docker-compose -f docker-compose.ci.yml up --abort-on-container-exit --exit-code-from node | ||
no_output_timeout: 2m | ||
- run: | ||
name: Copy report | ||
command: docker cp e2e-tests-container:/usr/app/report/cucumber/html/. ~/report | ||
- store_artifacts: | ||
path: ~/report | ||
|
||
workflows: | ||
e2e-tests: | ||
jobs: | ||
- e2e-tests |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
.vscode | ||
node_modules | ||
report | ||
.dockerignore | ||
.gitignore | ||
Dockerfile |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
SELENIUM_VERSION=3.141.59-zirconium | ||
SCREEN_WIDTH=1280 | ||
SCREEN_HEIGHT=720 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
module.exports = { | ||
parser: "@typescript-eslint/parser", | ||
plugins: ["@typescript-eslint"], | ||
extends: [ | ||
"eslint:recommended", | ||
"plugin:@typescript-eslint/eslint-recommended", | ||
"plugin:@typescript-eslint/recommended", | ||
"plugin:@typescript-eslint/recommended-requiring-type-checking" | ||
], | ||
parserOptions: { | ||
ecmaVersion: 2018, | ||
sourceType: 'module', | ||
project: './tsconfig.json', | ||
tsconfigRootDir: __dirname, | ||
}, | ||
rules: { | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
name: CI | ||
|
||
on: [push] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Pull docker images | ||
run: docker-compose -f docker-compose.ci.yml pull | ||
|
||
- name: Build docker images | ||
run: docker-compose -f docker-compose.ci.yml build | ||
|
||
- name: Run tests | ||
run: docker-compose -f docker-compose.ci.yml up --abort-on-container-exit --exit-code-from node | ||
|
||
- uses: actions/upload-artifact@v1 | ||
with: | ||
name: report | ||
path: report |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,3 @@ | ||
node_modules | ||
dist | ||
report |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
language: node_js | ||
|
||
services: | ||
- docker | ||
|
||
before_install: | ||
- docker-compose -f docker-compose.ci.yml pull | ||
|
||
install: | ||
- docker-compose -f docker-compose.ci.yml build | ||
|
||
script: | ||
- docker-compose -f docker-compose.ci.yml up --abort-on-container-exit --exit-code-from node |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
{ | ||
// Use IntelliSense to learn about possible attributes. | ||
// Hover to view descriptions of existing attributes. | ||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"name": "Debug current test", | ||
"type": "node", | ||
"request": "launch", | ||
"args": ["wdio.conf.js", "--spec", "${file}"], | ||
"cwd": "${workspaceFolder}", | ||
"autoAttachChildProcesses": true, | ||
"program": "${workspaceRoot}/node_modules/@wdio/cli/bin/wdio.js", | ||
"console": "integratedTerminal", | ||
"env": { | ||
"DEBUG_TESTS": "true", | ||
"VNC_SUPPORT": "false" | ||
}, | ||
}, | ||
{ | ||
"name": "Debug all tests", | ||
"type": "node", | ||
"request": "launch", | ||
"args": ["wdio.conf.js", "--spec"], | ||
"cwd": "${workspaceFolder}", | ||
"autoAttachChildProcesses": true, | ||
"program": "${workspaceRoot}/node_modules/@wdio/cli/bin/wdio.js", | ||
"console": "integratedTerminal", | ||
"env": { | ||
"DEBUG_TESTS": "true", | ||
"VNC_SUPPORT": "false" | ||
}, | ||
}, | ||
{ | ||
"name": "VNC Debug current test", | ||
"type": "node", | ||
"request": "launch", | ||
"args": ["wdio.conf.js", "--spec", "${file}"], | ||
"cwd": "${workspaceFolder}", | ||
"autoAttachChildProcesses": true, | ||
"program": "${workspaceRoot}/node_modules/@wdio/cli/bin/wdio.js", | ||
"console": "integratedTerminal", | ||
"env": { | ||
"DEBUG_TESTS": "true", | ||
"VNC_SUPPORT": "true" | ||
}, | ||
}, | ||
{ | ||
"name": "VNC Debug all tests", | ||
"type": "node", | ||
"request": "launch", | ||
"args": ["wdio.conf.js", "--spec"], | ||
"cwd": "${workspaceFolder}", | ||
"autoAttachChildProcesses": true, | ||
"program": "${workspaceRoot}/node_modules/@wdio/cli/bin/wdio.js", | ||
"console": "integratedTerminal", | ||
"env": { | ||
"DEBUG_TESTS": "true", | ||
"VNC_SUPPORT": "true" | ||
}, | ||
}, | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{ | ||
"typescript.tsdk": "./node_modules/typescript/lib", | ||
"files.exclude": { | ||
"**/.git": true, | ||
"**/node_modules": true, | ||
"**/dist": true, | ||
}, | ||
"[typescript]": { | ||
"editor.formatOnSave": true, | ||
"editor.formatOnPaste": true | ||
}, | ||
"[markdown]": { | ||
"editor.formatOnSave": true, | ||
"editor.renderWhitespace": "all", | ||
"editor.acceptSuggestionOnEnter": "off" | ||
}, | ||
"editor.autoIndent": "full", | ||
"typescript.preferences.importModuleSpecifier": "relative", | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
{ | ||
"version": "2.0.0", | ||
"tasks": [ | ||
{ | ||
"label": "selenium: start", | ||
"type": "shell", | ||
"command": "npm run selenium", | ||
"group": "build", | ||
"problemMatcher": [ | ||
"$tsc" | ||
], | ||
"presentation": { | ||
"reveal": "always", | ||
"panel": "shared" | ||
} | ||
}, | ||
{ | ||
"label": "selenium: start vnc", | ||
"type": "shell", | ||
"command": "npm run selenium:vnc", | ||
"group": "build", | ||
"problemMatcher": [ | ||
"$tsc" | ||
], | ||
"presentation": { | ||
"reveal": "always", | ||
"panel": "shared" | ||
} | ||
}, | ||
{ | ||
"label": "selenium: stop", | ||
"type": "shell", | ||
"command": "npm run selenium:stop", | ||
"group": "build", | ||
"problemMatcher": [ | ||
"$tsc" | ||
], | ||
"presentation": { | ||
"reveal": "always", | ||
"panel": "shared" | ||
} | ||
}, | ||
{ | ||
"label": "test", | ||
"type": "shell", | ||
"command": "npm run test", | ||
"group": "test", | ||
"problemMatcher": [ | ||
"$tsc" | ||
], | ||
"presentation": { | ||
"reveal": "always", | ||
"panel": "new" | ||
}, | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
FROM node:12 | ||
LABEL maintainer="Labs42" | ||
|
||
WORKDIR /usr/app | ||
|
||
ADD ./scripts/wait-for-it.sh ./ | ||
RUN chmod 755 wait-for-it.sh | ||
ADD ./scripts/run.sh ./ | ||
RUN chmod 755 run.sh | ||
|
||
ADD ./package.json package.json | ||
ADD ./package-lock.json package-lock.json | ||
|
||
RUN npm ci | ||
ADD ./.env ./ | ||
ADD ./tsconfig.json ./ | ||
ADD ./.eslintrc.js ./ | ||
ADD ./wdio.conf.js ./ | ||
ADD ./cucumber.report.conf.js ./ | ||
ADD ./config config | ||
ADD ./src src | ||
RUN npm run lint | ||
|
||
CMD [ "./run.sh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
The MIT License (MIT) | ||
|
||
Copyright (c) 2020 Labs42 <hello@labs42.io> | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
theme: jekyll-theme-cayman |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
module.exports = { | ||
presets: [ | ||
[ | ||
'@babel/preset-env', | ||
{ | ||
targets: { | ||
node: 'current', | ||
}, | ||
}, | ||
], | ||
], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
export const capabilitiesChromeConfig = { | ||
'maxInstances': 1, | ||
'browserName': 'chrome', | ||
'goog:chromeOptions': { | ||
args: [ | ||
'--no-sandbox', | ||
].concat( | ||
process.env.VNC_SUPPORT === 'true' ? [ | ||
// When debugging with VNC support headless mode is not enabled | ||
// to allow viewing actions in the browser. | ||
] : [ | ||
'--headless', | ||
'--disable-gpu', | ||
], | ||
), | ||
}, | ||
'cjson:metadata': { | ||
device: process.env.SELENIUM_VERSION, | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
// https://github.com/mozilla/geckodriver/blob/master/README.md#firefox-capabilities | ||
|
||
export const capabilitiesFirefoxConfig = { | ||
// 'maxInstances': 0, | ||
// 'browserName': 'firefox', | ||
// 'moz:firefoxOptions': { | ||
// args: [].concat( | ||
// process.env.VNC_SUPPORT === 'true' ? [ | ||
// // When debugging with VNC support headless mode is not enabled | ||
// // to allow viewing actions in the browser. | ||
// ] : [ | ||
|
||
// '-headless', | ||
// ]), | ||
// }, | ||
// 'acceptInsecureCerts': true, | ||
// 'cjson:metadata': { | ||
// device: process.env.SELENIUM_VERSION, | ||
// }, | ||
}; |
Oops, something went wrong.