Skip to content

Commit

Permalink
Circleci project setup (#11)
Browse files Browse the repository at this point in the history
* Add .circleci/config.yml

* update workflow

* update workflow

* update workflow

* update workflow

* update workflow

* update workflow

* update workflow

* update workflow

* update workflow

* update workflow

* update workflow

* update workflow

* update workflow

* update workflow

* update workflow

* update workflow

* update workflow

* update workflow

* update workflow

* update workflow

* update workflow

* update workflow

* update workflow

* Add .circleci/config.yml

* update workflow

* update workflow

* update workflow

* update workflow

* update workflow

* update workflow

* update workflow

* update workflow

* update workflow

* update workflow

* update workflow

* update workflow

* update workflow

* update workflow

* update workflow

* update workflow

* update workflow

* update workflow

* update workflow

* update workflow

* update workflow

* update workflow

---------

Co-authored-by: Ruwan Geeganage <[email protected]>
  • Loading branch information
rpgeeganage and Ruwan Geeganage authored Mar 2, 2023
1 parent 4630588 commit b98b403
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 6 deletions.
15 changes: 15 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
version: 2.1

jobs:
build:
machine: true
steps:
- checkout
- run:
name: Run Tests
command: |
docker-compose -p e2eproject -f ./docker-compose.e2e.yml up e2e
code=$(docker inspect $(docker ps -aqf "name=ots-share-e2e-pw-run") --format='{{.State.ExitCode}}')
docker-compose -p e2eproject down
exit $code
5 changes: 4 additions & 1 deletion docker-compose.e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ services:
- ots-share-mongo-local-e2e
links:
- ots-share-mongo-local-e2e
restart: on-failure:5

ots-share-mongo-local-e2e:
image: mongo:4.2
Expand All @@ -33,6 +34,7 @@ services:
build:
context: .
dockerfile: Dockerfile.e2e
container_name: ots-share-e2e-pw-run
working_dir: /opt
environment:
- OTS_SHARE_URL=http://ots-share-e2e
Expand All @@ -41,12 +43,13 @@ services:
command:
- sh
- -c
- "cd e2e && npm t"
- "cd e2e && npm install && npx playwright install-deps && npx playwright install firefox && npm t"
links:
- ots-share-e2e

e2e-dev:
image: ots-share-e2e-pw
container_name: ots-share-e2e-pw-dev
build:
context: .
dockerfile: Dockerfile.e2e
Expand Down
2 changes: 1 addition & 1 deletion e2e/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ module.exports = {
testEnvironment: 'node',
collectCoverage: false,
reporters: ['default'],
testTimeout: 200000,
testTimeout: 20000000,
testEnvironmentOptions: {
'jest-playwright': {
browsers: ['firefox'],
Expand Down
2 changes: 0 additions & 2 deletions e2e/tests/file.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ import { OTS_SHARE_URL, checkUp } from './configs';
const artifactFile = './sample_artifacts/favicon.ico';
const artifactDownloadedPath = path.join(os.tmpdir(), Date.now().toString());

jest.setTimeout(40 * 1000);

describe('Example.com', () => {
let browser: Browser;

Expand Down
2 changes: 0 additions & 2 deletions e2e/tests/text.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ import { type Browser, firefox } from 'playwright';

import { OTS_SHARE_URL, checkUp } from './configs';

jest.setTimeout(40 * 1000);

describe('Example.com', () => {
let browser: Browser;

Expand Down

0 comments on commit b98b403

Please sign in to comment.