-
Notifications
You must be signed in to change notification settings - Fork 451
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: Tests fail only when running on Github Actions (locally runs fine) #4056
Comments
I have a very similar issue.
The test:
Versions:
Config:
TSConfig:
Funny thing (not so much): Github action fails if running |
Having the same issue but with snapshot testing. Local runs fine, but when running in -ci mode, jest couldn't find the snapshot file it seems... |
Version
28.0
Steps to reproduce
Create yarn workspace with two workspaces inside packages folder
Create test in first workspace that has a dependency on second workspace
Run yarn test locally, no issue
Run on Github Actions error: Unable to process '/home/runner/work/arch3.js/arch3.js/packages/arch3-core/src/archwayclient.ts', please make sure that
outDir
in your tsconfig is neither''
or'.'
. You can also configure Jest config optiontransformIgnorePatterns
to informts-jest
to transform /home/runner/work/arch3.js/arch3.js/packages/arch3-core/src/archwayclient.tsat TsCompiler.getCompiledOutput (../../node_modules/ts-jest/dist/legacy/compiler/ts-compiler.js:165:27)
at TsJestCompiler.getCompiledOutput (../../node_modules/ts-jest/dist/legacy/compiler/ts-jest-compiler.js:13:39)
at TsJestTransformer.processWithTs (../../node_modules/ts-jest/dist/legacy/ts-jest-transformer.js:232:37)
at TsJestTransformer.process (../../node_modules/ts-jest/dist/legacy/ts-jest-transformer.js:161:24)
at ScriptTransformer.transformSource (../../node_modules/@jest/transform/build/ScriptTransformer.js:619:31)
at ScriptTransformer._transformAndBuildScript (../../node_modules/@jest/transform/build/ScriptTransformer.js:765:40)
at ScriptTransformer.transform (../../node_modules/@jest/transform/build/ScriptTransformer.js:822:19)
Expected behavior
Should run to completion like it does on local machine.
Actual behavior
Fails saying it cannot process a typescript file. It would help to know what the precise failure in processing the typescript file is.
My outDir is set (again it works locally)
Debug log
11s
Run yarn test:core
FAIL src/archwayclient-rewards.spec.ts
● Test suite failed to run
FAIL src/archwayclient.spec.ts
● Test suite failed to run
------------------|---------|----------|---------|---------|-------------------
Additional context
Github runner is ubuntu latest
Environment
The text was updated successfully, but these errors were encountered: