From 82b74679a7f7e0e12a8794d472e13a0cdb0c6d2a Mon Sep 17 00:00:00 2001 From: Raphael Flechtner Date: Thu, 20 Jul 2023 22:57:34 +0200 Subject: [PATCH] ci: run esm tests in ci --- .github/workflows/test-node-candidate.yml | 2 +- .github/workflows/tests-polkadot-deps.yml | 8 ++++++-- .github/workflows/tests.yml | 9 +++++++-- jest.config.integration.esm.js | 2 +- jest.config.integration.js | 2 +- package.json | 1 - 6 files changed, 16 insertions(+), 8 deletions(-) diff --git a/.github/workflows/test-node-candidate.yml b/.github/workflows/test-node-candidate.yml index 8e933834f..47e249598 100644 --- a/.github/workflows/test-node-candidate.yml +++ b/.github/workflows/test-node-candidate.yml @@ -90,7 +90,7 @@ jobs: - name: run integration tests timeout-minutes: 60 - run: yarn test:integration:ci + run: yarn test:integration -b bundle_cache: runs-on: ubuntu-latest diff --git a/.github/workflows/tests-polkadot-deps.yml b/.github/workflows/tests-polkadot-deps.yml index 837030d49..ce47e76b5 100644 --- a/.github/workflows/tests-polkadot-deps.yml +++ b/.github/workflows/tests-polkadot-deps.yml @@ -122,9 +122,13 @@ jobs: with: image: ${{ env.TESTCONTAINERS_WATCHER_IMG }} - - name: run integration tests + - name: run integration tests (cjs) timeout-minutes: 60 - run: yarn test:integration:ci + run: yarn test:integration -b + + - name: run integration tests (esm) + timeout-minutes: 60 + run: yarn test:integration:esm -b create-issue: runs-on: ubuntu-latest diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 626adea2b..933dbecff 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -161,9 +161,14 @@ jobs: with: image: ${{ env.TESTCONTAINERS_WATCHER_IMG }} - - name: run integration tests + - name: run integration tests (cjs) timeout-minutes: 60 - run: yarn test:integration:ci + run: yarn test:integration -b + + - name: run integration tests (esm) + timeout-minutes: 60 + run: yarn test:integration:esm -b + bundle_cache: runs-on: ubuntu-latest diff --git a/jest.config.integration.esm.js b/jest.config.integration.esm.js index 7a5dfaee1..7eb104a2e 100644 --- a/jest.config.integration.esm.js +++ b/jest.config.integration.esm.js @@ -2,7 +2,7 @@ module.exports = { testEnvironment: 'node', clearMocks: true, // Parachain block time is 12s - testTimeout: 30000, + testTimeout: 120_000, maxWorkers: 3, rootDir: 'tests/integration/dist', transform: {}, diff --git a/jest.config.integration.js b/jest.config.integration.js index 91af9ead3..1363524a9 100644 --- a/jest.config.integration.js +++ b/jest.config.integration.js @@ -3,7 +3,7 @@ module.exports = { testEnvironment: 'node', clearMocks: true, // Parachain block time is 12s - testTimeout: 30000, + testTimeout: 120_000, maxWorkers: 3, testPathIgnorePatterns: ['dist'], transformIgnorePatterns: ['/node_modules/(?!@digitalbazaar|base.+-universal|crypto-ld)'], diff --git a/package.json b/package.json index 0aef01fda..f1276aed5 100644 --- a/package.json +++ b/package.json @@ -25,7 +25,6 @@ "test:ci": "yarn test --ci --forceExit", "test:integration": "jest -c jest.config.integration.js", "test:integration:esm": "tsc -p tests/integration/tsconfig.esm.json && yarn node --experimental-vm-modules $(yarn bin jest) -c jest.config.integration.esm.js", - "test:integration:ci": "yarn test:integration -b --testTimeout=60000", "test:integration:latest-develop": "TESTCONTAINERS_NODE_IMG=kiltprotocol/mashnet-node:latest-develop yarn test:integration", "test:watch": "yarn test --watch", "test:bundle": "tsc -p tests/bundle/tsconfig.json && yarn ./tests/bundle playwright test --config playwright.config.ts",