Skip to content

Commit

Permalink
Re-insert deleting the output container
Browse files Browse the repository at this point in the history
  • Loading branch information
ospfranco committed Oct 17, 2023
1 parent 073ea41 commit a357848
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 18 deletions.
14 changes: 4 additions & 10 deletions .github/workflows/e2ePerformanceTests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -181,12 +181,11 @@ jobs:
test_spec_file: tests/e2e/TestSpecMain.yml
test_spec_type: APPIUM_NODE_TEST_SPEC
remote_src: false
file_artifacts: Customer Artifacts.zip
file_artifacts: MainArtifacts.zip
cleanup: true

- name: Unzip AWS Device Farm main results
if: ${{ always() }}
run: unzip "Customer Artifacts.zip" -d mainResults
run: unzip MainArtifacts.zip -d mainResults

- name: Schedule AWS Device Farm test run on delta branch
uses: realm/aws-devicefarm/test-application@7b9a91236c456c97e28d384c9e476035d5ea686b
Expand All @@ -202,21 +201,16 @@ jobs:
test_spec_file: tests/e2e/TestSpecDelta.yml
test_spec_type: APPIUM_NODE_TEST_SPEC
remote_src: false
file_artifacts: Customer Artifacts.zip
file_artifacts: DeltaArtifacts.zip
cleanup: true

- name: Unzip AWS Device Farm delta results
if: ${{ always() }}
run: unzip "Customer Artifacts.zip" -d deltaResults

run: unzip DeltaArtifacts.zip -d deltaResults

- name: Compare results
if: ${{ always() }}
run: node "./Host_Machine_File/tests/e2e/merge.js --mainPath ../../mainResults/\$WORKING_DIRECTORY/main.json --deltaPath ../../deltaResults/\$WORKING_DIRECTORY/delta.json --outputPath ./Host_Machine_Files/output.md"


- name: Print results
if: ${{ always() }}
run: cat "./Host_Machine_Files/output.md"

# - name: Print AWS Device Farm verbose run results
Expand Down
12 changes: 4 additions & 8 deletions tests/e2e/testRunner.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,15 +71,11 @@ if (args.includes('--config')) {
setConfigPath(configPath);
}

// Clear all files from previous jobs
if (!fs.existsSync(config.OUTPUT_DIR)) {
fs.mkdirSync(config.OUTPUT_DIR);
}

try {
if (fs.existsSync(`${config.OUTPUT_DIR}/${label}.json`)) {
fs.rmSync(`${config.OUTPUT_DIR}/${label}.json`);
}
// Clear all files from previous jobs
fs.rmSync(config.OUTPUT_DIR, {recursive: true, force: true});

fs.mkdirSync(config.OUTPUT_DIR);
} catch (error) {
// Do nothing
console.error(error);
Expand Down

0 comments on commit a357848

Please sign in to comment.