From 7879b2fcd38d752aa3c2e35dad63b8e49b639b9e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hanno=20J=2E=20G=C3=B6decke?= Date: Mon, 19 Feb 2024 09:26:40 +0100 Subject: [PATCH] run test in AWS with ts-node --- .github/workflows/e2ePerformanceTests.yml | 15 +++++++++++++++ tests/e2e/TestSpec.yml | 4 ++-- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/.github/workflows/e2ePerformanceTests.yml b/.github/workflows/e2ePerformanceTests.yml index ad0f60bf4018..338cb8313465 100644 --- a/.github/workflows/e2ePerformanceTests.yml +++ b/.github/workflows/e2ePerformanceTests.yml @@ -178,6 +178,21 @@ jobs: - name: Copy e2e code into zip folder run: cp -r tests/e2e zip + # Note: we can't reuse the apps tsconfig, as it depends on modules that aren't available in the AWS Device Farm environment + - name: Write tsconfig.json to zip folder + run: | + echo '{ + "compilerOptions": { + "target": "ESNext", + "module": "commonjs", + "strict": true, + "esModuleInterop": true, + "skipLibCheck": true, + "forceConsistentCasingInFileNames": true, + "allowJs": true, + } + }' > zip/tsconfig.json + - name: Zip everything in the zip directory up run: zip -qr App.zip ./zip diff --git a/tests/e2e/TestSpec.yml b/tests/e2e/TestSpec.yml index a234ef67b8a6..acc5926e93a5 100644 --- a/tests/e2e/TestSpec.yml +++ b/tests/e2e/TestSpec.yml @@ -21,8 +21,8 @@ phases: test: commands: - cd zip - - npm install underscore - - node e2e/testRunner.js -- --skipInstallDeps --buildMode "skip" --skipCheckout --mainAppPath app-e2eRelease.apk --deltaAppPath app-e2edeltaRelease.apk + - npm install underscore ts-node typescript + - npx ts-node e2e/testRunner.js -- --skipInstallDeps --buildMode "skip" --skipCheckout --mainAppPath app-e2eRelease.apk --deltaAppPath app-e2edeltaRelease.apk artifacts: - $WORKING_DIRECTORY