Skip to content

Commit 9218b51

Browse files
committed
test
1 parent 898c94c commit 9218b51

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

.github/workflows/tests-frontend.yml

+11-3
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ env:
1111
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
1212
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
1313
REPORT_NAME: "report-vscode-fe"
14+
S3_PATH: "report-vscode-fe"
1415

1516
jobs:
1617
unit-tests:
@@ -35,13 +36,20 @@ jobs:
3536
if: always()
3637
run: |
3738
38-
SUB_PATH=test-reports/${{ steps.date.outputs.date }}/${{ github.run_id }}
39+
GZIP_FILE=report/html.meta.json.gz
40+
S3_SUB_PATH="${{ steps.date.outputs.date }}/${{ github.run_id }}/${{ env.REPORT_NAME }}"
3941
40-
aws s3 cp report/ s3://${AWS_BUCKET_NAME_TEST}/public/${SUB_PATH} --recursive
42+
aws s3 cp report/ s3://${AWS_BUCKET_NAME_TEST}/public/${S3_SUB_PATH} --recursive --exclude "*.gz"
43+
44+
# s3 modified "gzip" content-type
45+
# https://github.com/aws/aws-cli/issues/1131
46+
aws s3 cp $GZIP_FILE s3://${AWS_BUCKET_NAME_TEST}/public/${S3_SUB_PATH} --content-type "application/x-gzip" --metadata-directive REPLACE
47+
48+
echo "$S3_SUB_PATH" >> $GITHUB_ENV
4149
4250
4351
- name: Add link to report in the workflow summary
4452
if: always()
4553
run: |
46-
link="${{ vars.DEFAULT_TEST_REPORTS_URL }}/${{ steps.date.outputs.date }}/${{ github.run_id }}/${{ env.REPORT_NAME }}/index.html"
54+
link="${{ vars.DEFAULT_TEST_REPORTS_URL }}/${S3_SUB_PATH}/index.html"
4755
echo "[${link}](${link})" >> $GITHUB_STEP_SUMMARY

0 commit comments

Comments
 (0)