Skip to content

Commit

Permalink
action timeout (#524)
Browse files Browse the repository at this point in the history
* action timeout

* exit on fail test

* update deps
  • Loading branch information
ermalkaleci authored Nov 7, 2023
1 parent 7a9cb64 commit c3c56ec
Show file tree
Hide file tree
Showing 13 changed files with 556 additions and 524 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ jobs:
- run: yarn lint
- run: yarn build
- run: yarn test
timeout-minutes: 30

sidecar:
if: ${{ github.ref_name == 'master' }}
Expand Down Expand Up @@ -74,7 +75,7 @@ jobs:
- name: Test Sidecar
run: yarn workspace @acala-network/chopsticks-e2e run sidecar

playwright:
web-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand Down
2 changes: 1 addition & 1 deletion executor/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"@polkadot/wasm-util": "^7.2.2"
},
"devDependencies": {
"fflate": "^0.8.0"
"fflate": "^0.8.1"
},
"files": [
"browser/index.js",
Expand Down
24 changes: 12 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,23 +42,23 @@
},
"devDependencies": {
"@swc/core": "^1.3.96",
"@types/node": "^20.5.7",
"@types/node": "^20.9.0",
"@types/prettier": "^3.0.0",
"@typescript-eslint/eslint-plugin": "^6.5.0",
"@typescript-eslint/parser": "^6.4.0",
"eslint": "^8.48.0",
"@typescript-eslint/eslint-plugin": "^6.10.0",
"@typescript-eslint/parser": "^6.10.0",
"eslint": "^8.53.0",
"eslint-config-prettier": "^9.0.0",
"eslint-import-resolver-typescript": "^3.6.0",
"eslint-plugin-import": "^2.28.1",
"eslint-import-resolver-typescript": "^3.6.1",
"eslint-plugin-import": "^2.29.0",
"eslint-plugin-sort-imports-es6-autofix": "^0.6.0",
"husky": "^8.0.3",
"prettier": "^3.0.2",
"prettier": "^3.0.3",
"ts-node": "^10.9.1",
"typedoc": "^0.25.1",
"typedoc-plugin-markdown": "^3.16.0",
"typescript": "^5.1.6",
"unplugin-swc": "^1.4.2",
"vite-tsconfig-paths": "^4.2.0",
"typedoc": "^0.25.3",
"typedoc-plugin-markdown": "^3.17.1",
"typescript": "^5.2.2",
"unplugin-swc": "^1.4.3",
"vite-tsconfig-paths": "^4.2.1",
"vitepress": "^1.0.0-rc.23",
"vitest": "^0.34.6",
"wasm-pack": "^0.12.1"
Expand Down
16 changes: 8 additions & 8 deletions packages/chopsticks/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,18 +25,18 @@
"lodash": "^4.17.21",
"ws": "^8.14.2",
"yargs": "^17.7.2",
"zod": "^3.22.3"
"zod": "^3.22.4"
},
"devDependencies": {
"@swc/cli": "0.1.62",
"@swc/core": "^1.3.96",
"@types/global-agent": "^2.1.1",
"@types/js-yaml": "^4.0.5",
"@types/lodash": "^4.14.199",
"@types/node": "^20.5.7",
"@types/ws": "^8.5.6",
"@types/yargs": "^17.0.29",
"typescript": "^5.1.6"
"@types/global-agent": "^2.1.3",
"@types/js-yaml": "^4.0.9",
"@types/lodash": "^4.14.201",
"@types/node": "^20.9.0",
"@types/ws": "^8.5.9",
"@types/yargs": "^17.0.31",
"typescript": "^5.2.2"
},
"files": [
"dist/esm/**",
Expand Down
8 changes: 4 additions & 4 deletions packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,14 @@
"eventemitter3": "^5.0.1",
"lodash": "^4.17.21",
"pino": "^8.16.1",
"pino-pretty": "^10.2.0",
"zod": "^3.22.3"
"pino-pretty": "^10.2.3",
"zod": "^3.22.4"
},
"devDependencies": {
"@swc/cli": "0.1.62",
"@swc/core": "^1.3.96",
"@types/lodash": "^4.14.199",
"typescript": "^5.1.6"
"@types/lodash": "^4.14.201",
"typescript": "^5.2.2"
},
"files": [
"dist/esm/**",
Expand Down
3 changes: 3 additions & 0 deletions packages/core/src/wasm-executor/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,9 @@ export const releaseWorker = async () => {
if (!__executor_worker) return
const executor = await __executor_worker
executor.remote[Comlink.releaseProxy]()
// this delay seems to fix hanging tests
// https://github.com/vitest-dev/vitest/issues/3077
await new Promise((resolve) => setTimeout(resolve, 50))
await executor.terminate()
__executor_worker = undefined
}
2 changes: 1 addition & 1 deletion packages/db/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"devDependencies": {
"@swc/cli": "0.1.62",
"@swc/core": "^1.3.96",
"typescript": "^5.1.6"
"typescript": "^5.2.2"
},
"files": [
"dist/esm/**",
Expand Down
2 changes: 1 addition & 1 deletion packages/e2e/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"@acala-network/chopsticks": "workspace:*",
"@acala-network/chopsticks-testing": "workspace:*",
"@polkadot/api": "^10.10.1",
"typescript": "^5.1.6",
"typescript": "^5.2.2",
"vitest": "^0.34.6"
}
}
4 changes: 2 additions & 2 deletions packages/testing/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
"devDependencies": {
"@swc/cli": "0.1.62",
"@swc/core": "^1.3.96",
"@types/chai": "^4.3.5",
"typescript": "^5.1.6"
"@types/chai": "^4.3.10",
"typescript": "^5.2.2"
},
"files": [
"dist/esm/**",
Expand Down
12 changes: 6 additions & 6 deletions packages/web-test/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,16 @@
"@acala-network/chopsticks-db": "workspace:*",
"@emotion/react": "^11.11.1",
"@emotion/styled": "^11.11.0",
"@mui/material": "^5.14.11",
"@playwright/test": "^1.37.1",
"@types/react": "^18",
"@types/react-dom": "^18",
"@vitejs/plugin-react": "^4.1.0",
"@mui/material": "^5.14.17",
"@playwright/test": "^1.39.0",
"@types/react": "^18.2.37",
"@types/react-dom": "^18.2.15",
"@vitejs/plugin-react": "^4.1.1",
"crypto-browserify": "^3.12.0",
"path-browserify": "^1.0.1",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"stream-browserify": "^3.0.0",
"typescript": "^5.1.6"
"typescript": "^5.2.2"
}
}
2 changes: 1 addition & 1 deletion tsconfig.base.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"esModuleInterop": true,
"lib": ["esnext", "dom", "dom.iterable"],
"isolatedModules": true,
"module": "esnext",
"module": "nodenext",
"moduleResolution": "nodenext",
"noUnusedLocals": true,
"noUnusedParameters": true,
Expand Down
1 change: 1 addition & 0 deletions vitest.config.mts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ export default defineConfig({
hookTimeout: 30000,
testTimeout: 120000,
include: ['packages/**/*.test.ts'],
bail: process.env.CI ? 1 : undefined /* use defaults */,
},
plugins: [swc.vite(), tsconfigPaths()],
})
Loading

0 comments on commit c3c56ec

Please sign in to comment.