File tree 1 file changed +11
-3
lines changed
1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change 11
11
AWS_ACCESS_KEY_ID : ${{ secrets.AWS_ACCESS_KEY_ID }}
12
12
AWS_SECRET_ACCESS_KEY : ${{ secrets.AWS_SECRET_ACCESS_KEY }}
13
13
REPORT_NAME : " report-vscode-fe"
14
+ S3_PATH : " report-vscode-fe"
14
15
15
16
jobs :
16
17
unit-tests :
@@ -35,13 +36,20 @@ jobs:
35
36
if : always()
36
37
run : |
37
38
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 }}"
39
41
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
41
49
42
50
43
51
- name : Add link to report in the workflow summary
44
52
if : always()
45
53
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"
47
55
echo "[${link}](${link})" >> $GITHUB_STEP_SUMMARY
You can’t perform that action at this time.
0 commit comments