From f9e491857b6c061b76044241a0067d39c5f6b133 Mon Sep 17 00:00:00 2001 From: starbirdtech383 Date: Thu, 31 Aug 2023 22:34:43 +0530 Subject: [PATCH] pw logs in self hosted runner --- .github/workflows/playwright-test-workflow.yml | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/.github/workflows/playwright-test-workflow.yml b/.github/workflows/playwright-test-workflow.yml index 60b62f90ff..d27e9a0802 100644 --- a/.github/workflows/playwright-test-workflow.yml +++ b/.github/workflows/playwright-test-workflow.yml @@ -199,4 +199,20 @@ jobs: working-directory: ./packages/nocodb run: | service postgresql stop - service mysql stop \ No newline at end of file + service mysql stop + - name: Copy Artifacts to Local Artifacts Dir + if: always() + working-directory: ./ + run: | + # expects the variables to be available in runner context. + path="gh-artifacts/runs/${GITHUB_RUN_ID}/run-attempt/${GITHUB_RUN_ATTEMPT}/job_name/"${GITHUB_JOB}"-${{ inputs.shard }}/${RANDOM}-$(date +%s)" + target_dir="/mnt/${path}" + mkdir -p ${target_dir} + mkdir -p ${target_dir}/playwright-report + # start : add any artifacts to be copied here + cp -r ./tests/playwright/playwright-report ${target_dir}/ || echo "playwright reports directory does not exists" >> ${target_dir}/playwright-report/index.html + cp ./packages/nocodb/*_test_backend.log ${target_dir}/ || echo "backend logs file does not exists" >> ${target_dir}/index.html + # end: artifacts copy + SUMMARY='[Artifacts](http://135.181.48.96/'${path}') + [playwright-report](http://135.181.48.96/'${path}'/playwright-report)' + echo "$SUMMARY" >> $GITHUB_STEP_SUMMARY \ No newline at end of file