github アクションで ci/cd ワークフローを使用しようとしていますが、
私は単体テストに jest を使用し、moduleNameMapper
以下のように設定します。
"moduleNameMapper": {
"^src/(.*)$": "<rootDir>/src/$1",
"^components/(.*)$": "<rootDir>/src/components/$1"
}
ローカルで正常に実行できますがnpm test
、github アクションは常にエラーになります:
Could not locate module src/components/tool-panel/Container.vue (mapped as /home/runner/work/its-me/its-me/src/components/tool-panel/Container.vue)
Please check:
"moduleNameMapper": {
"/^src\/(.*)$/": "/home/runner/work/its-me/its-me/src/$1"
},
"resolver": undefined
は に置き換え<rootDir>
られているようで、このパス /home/runner/work/its-me/its-me
にはフォルダーがありません: 。src
/home/runner/work/its-me/its-me
では、正しいルートパスを設定するにはどうすればよいですか?
githubアクションサーバーにsshできるかどうかわかりません。
これは私の github リポジトリです: It's me
どんな助けでも大歓迎です!!