From d5bc151491bc9c212103575bb25918d95c3c841d Mon Sep 17 00:00:00 2001 From: bcaglayan Date: Thu, 24 Mar 2022 15:55:05 +0300 Subject: [PATCH 1/9] Add ci-test GH workflow --- .github/workflows/ci-check.yml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 .github/workflows/ci-check.yml diff --git a/.github/workflows/ci-check.yml b/.github/workflows/ci-check.yml new file mode 100644 index 00000000..d2423d99 --- /dev/null +++ b/.github/workflows/ci-check.yml @@ -0,0 +1,24 @@ +name: Thundra CI Check + +on: + push: + branches: [master] + pull_request: + branches: [master] + workflow_dispatch: + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Use Node.js 10.x + uses: actions/setup-node@v2 + with: + node-version: "10.x" + - name: NPM Install + run: npm install + - name: NPM Linter + run: npm run lint + - name: NPM Test CI + run: npm run test \ No newline at end of file From 061029ccd35c9fa82b3ec44f5c3aa98a76eacca3 Mon Sep 17 00:00:00 2001 From: bcaglayan Date: Thu, 24 Mar 2022 16:03:58 +0300 Subject: [PATCH 2/9] Try test-ci script --- .github/workflows/ci-check.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-check.yml b/.github/workflows/ci-check.yml index d2423d99..ee78a37c 100644 --- a/.github/workflows/ci-check.yml +++ b/.github/workflows/ci-check.yml @@ -21,4 +21,4 @@ jobs: - name: NPM Linter run: npm run lint - name: NPM Test CI - run: npm run test \ No newline at end of file + run: npm run test-ci \ No newline at end of file From 3d1dd0ba735ab2bb0479c03d1aae56f4bd5bcfcc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=BCleyman=20Barman?= Date: Fri, 6 Jan 2023 12:51:06 +0300 Subject: [PATCH 3/9] Update ci-check.yml --- .github/workflows/ci-check.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci-check.yml b/.github/workflows/ci-check.yml index ee78a37c..70319e15 100644 --- a/.github/workflows/ci-check.yml +++ b/.github/workflows/ci-check.yml @@ -1,4 +1,4 @@ -name: Thundra CI Check +name: npm-ci-check on: push: @@ -21,4 +21,4 @@ jobs: - name: NPM Linter run: npm run lint - name: NPM Test CI - run: npm run test-ci \ No newline at end of file + run: npm run test-ci From 1b907f06958d25848b7df865ad9305fba4826d01 Mon Sep 17 00:00:00 2001 From: Suleyman Barman Date: Tue, 21 Feb 2023 15:36:01 +0300 Subject: [PATCH 4/9] wip --- .github/workflows/ci-check.yml | 2 +- package.json | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci-check.yml b/.github/workflows/ci-check.yml index 70319e15..3ac63599 100644 --- a/.github/workflows/ci-check.yml +++ b/.github/workflows/ci-check.yml @@ -21,4 +21,4 @@ jobs: - name: NPM Linter run: npm run lint - name: NPM Test CI - run: npm run test-ci + run: npm run test diff --git a/package.json b/package.json index 4cdaa80f..90c77a8f 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,7 @@ "build": "rollup -c", "start": "npm-run-all --parallel watch:server watch:build", "test-automatic-instrumentation": "node ./test/instrumentation/automated.instrumentation.js", - "test": "npm run compile && npm run test-automatic-instrumentation && docker-compose up -d && jest --silent; docker-compose stop", + "test": "npm run compile && npm run test-automatic-instrumentation && docker-compose up -d && jest --silent --config jest.ci.config.js && docker-compose stop", "test-ci": "npm run compile && npm run test-automatic-instrumentation && jest --silent --config jest.ci.config.js --coverage && cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js", "lint": "tslint --project tsconfig.json -t stylish", "release-minor": "npm install; npm run build; release-it minor --ci --git.commit --git.push --git.tag --git.tagName='v${version}' --github.release --no-git.requireCleanWorkingDir --no-git.requireUpstream --npm.publish", @@ -101,7 +101,7 @@ "ioredis": "^4.10.0", "jest": "^27.0.0", "koa": "^2.13.1", - "mongodb": "^3.2.4", + "mongodb": "^3.6.3", "mysql": "^2.16.0", "mysql2": "2.1.0", "nock": "^10.0.6", From 9d4a7ad94231bba69c14ff861a2a53c3ba5225ae Mon Sep 17 00:00:00 2001 From: Suleyman Barman Date: Tue, 21 Feb 2023 18:15:42 +0300 Subject: [PATCH 5/9] wip --- .github/workflows/ci-check.yml | 4 ++++ package.json | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci-check.yml b/.github/workflows/ci-check.yml index 3ac63599..5313900f 100644 --- a/.github/workflows/ci-check.yml +++ b/.github/workflows/ci-check.yml @@ -20,5 +20,9 @@ jobs: run: npm install - name: NPM Linter run: npm run lint + - name: Docker Up + run: docker-compose up -d - name: NPM Test CI run: npm run test + - name: Docker Stop + run: docker-compose stop diff --git a/package.json b/package.json index 90c77a8f..b1c4d9ee 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,7 @@ "build": "rollup -c", "start": "npm-run-all --parallel watch:server watch:build", "test-automatic-instrumentation": "node ./test/instrumentation/automated.instrumentation.js", - "test": "npm run compile && npm run test-automatic-instrumentation && docker-compose up -d && jest --silent --config jest.ci.config.js && docker-compose stop", + "test": "npm run compile && npm run test-automatic-instrumentation && jest --silent --config jest.ci.config.js", "test-ci": "npm run compile && npm run test-automatic-instrumentation && jest --silent --config jest.ci.config.js --coverage && cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js", "lint": "tslint --project tsconfig.json -t stylish", "release-minor": "npm install; npm run build; release-it minor --ci --git.commit --git.push --git.tag --git.tagName='v${version}' --github.release --no-git.requireCleanWorkingDir --no-git.requireUpstream --npm.publish", From 7fe9beb7675dd3271c9ac31237a71a04671eda8a Mon Sep 17 00:00:00 2001 From: Suleyman Barman Date: Wed, 22 Feb 2023 00:40:09 +0300 Subject: [PATCH 6/9] wip --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index b1c4d9ee..e01f43a9 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,7 @@ "build": "rollup -c", "start": "npm-run-all --parallel watch:server watch:build", "test-automatic-instrumentation": "node ./test/instrumentation/automated.instrumentation.js", - "test": "npm run compile && npm run test-automatic-instrumentation && jest --silent --config jest.ci.config.js", + "test": "npm run compile && npm run test-automatic-instrumentation && jest --runInBand --force-exit --silent --config jest.ci.config.js", "test-ci": "npm run compile && npm run test-automatic-instrumentation && jest --silent --config jest.ci.config.js --coverage && cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js", "lint": "tslint --project tsconfig.json -t stylish", "release-minor": "npm install; npm run build; release-it minor --ci --git.commit --git.push --git.tag --git.tagName='v${version}' --github.release --no-git.requireCleanWorkingDir --no-git.requireUpstream --npm.publish", From 15fc87950a540aa7aba3b2d5f824f8182670f9ca Mon Sep 17 00:00:00 2001 From: Suleyman Barman Date: Wed, 22 Feb 2023 00:56:21 +0300 Subject: [PATCH 7/9] wip --- jest.ci.config.js | 1 + 1 file changed, 1 insertion(+) diff --git a/jest.ci.config.js b/jest.ci.config.js index f2f66522..96f9e63e 100644 --- a/jest.ci.config.js +++ b/jest.ci.config.js @@ -8,6 +8,7 @@ module.exports = { '/test/opentracing/*.js', '/test/integration/*.js' ], + 'maxWorkers': 1, 'transform': { '.+\\.(js|jsx|ts|tsx)$': 'babel-jest' }, From 2f240a4d57b5bef538df3e43becaff28f9b6dd1a Mon Sep 17 00:00:00 2001 From: Suleyman Barman Date: Wed, 22 Feb 2023 17:52:11 +0300 Subject: [PATCH 8/9] wip --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index e01f43a9..bcb30c58 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,7 @@ "build": "rollup -c", "start": "npm-run-all --parallel watch:server watch:build", "test-automatic-instrumentation": "node ./test/instrumentation/automated.instrumentation.js", - "test": "npm run compile && npm run test-automatic-instrumentation && jest --runInBand --force-exit --silent --config jest.ci.config.js", + "test": "npm run compile && npm run test-automatic-instrumentation && jest --runInBand --detectOpenHandles --force-exit --silent --config jest.ci.config.js", "test-ci": "npm run compile && npm run test-automatic-instrumentation && jest --silent --config jest.ci.config.js --coverage && cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js", "lint": "tslint --project tsconfig.json -t stylish", "release-minor": "npm install; npm run build; release-it minor --ci --git.commit --git.push --git.tag --git.tagName='v${version}' --github.release --no-git.requireCleanWorkingDir --no-git.requireUpstream --npm.publish", From 3f8475ad6164e28833cee8ab4ede9777c589b685 Mon Sep 17 00:00:00 2001 From: Suleyman Barman Date: Thu, 23 Feb 2023 17:29:07 +0300 Subject: [PATCH 9/9] wip --- .github/workflows/ci-check.yml | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci-check.yml b/.github/workflows/ci-check.yml index 5313900f..4115980b 100644 --- a/.github/workflows/ci-check.yml +++ b/.github/workflows/ci-check.yml @@ -12,17 +12,33 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 + + - name: Collect Workflow Telemetry + if: always() + uses: runforesight/foresight-workflow-kit-action@v1 + with: + api_key: ${{ secrets.FORESIGHT_PROD_API_KEY }} + - name: Use Node.js 10.x uses: actions/setup-node@v2 with: node-version: "10.x" - name: NPM Install - run: npm install + run: npm install -D jest-junit-reporter - name: NPM Linter run: npm run lint - name: Docker Up run: docker-compose up -d - name: NPM Test CI - run: npm run test + run: npm run test -- --testResultsProcessor="./node_modules/jest-junit-reporter" + - name: Analyze Test and/or Coverage Results + if: always() + uses: runforesight/foresight-test-kit-action@v1 + with: + api_key: ${{ secrets.FORESIGHT_PROD_API_KEY }} + test_framework: jest + test_format: junit + test_path: "./test-report.xml" + - name: Docker Stop run: docker-compose stop