3
3
workflow_call :
4
4
5
5
env :
6
+ SLACK_AUDIT_REPORT_CHANNEL : ${{ secrets.SLACK_AUDIT_REPORT_CHANNEL }}
6
7
SLACK_AUDIT_REPORT_KEY : ${{ secrets.SLACK_AUDIT_REPORT_KEY }}
8
+ AWS_BUCKET_NAME_TEST : ${{ vars.AWS_BUCKET_NAME_TEST }}
9
+ AWS_DEFAULT_REGION : ${{ vars.AWS_DEFAULT_REGION }}
10
+ AWS_DISTRIBUTION_ID : ${{ secrets.AWS_DISTRIBUTION_ID }}
11
+ AWS_ACCESS_KEY_ID : ${{ secrets.AWS_ACCESS_KEY_ID }}
12
+ AWS_SECRET_ACCESS_KEY : ${{ secrets.AWS_SECRET_ACCESS_KEY }}
13
+ REPORT_NAME : " report-vscode-fe"
14
+ S3_PATH : " report-vscode-fe"
7
15
8
16
jobs :
9
17
unit-tests :
@@ -18,21 +26,30 @@ jobs:
18
26
- name : Unit tests UI
19
27
run : yarn test:cov
20
28
21
- - name : Publish Test Results
22
- uses : EnricoMi/publish-unit-test-result-action@v2
29
+ - name : Get current date
30
+ id : date
23
31
if : always()
24
- with :
25
- check_name : ' FE Unit tests summary'
26
- comment_mode : ' failures'
27
- files : reports/junit.xml
32
+ uses : RedisInsight/RedisInsight/.github/actions/get-current-date@873a0ebf55c85d3127bb4efb4d0636d9ab838226
28
33
29
- - name : Generate test results
30
- uses : dorny/test-reporter@v1
34
+
35
+ - name : Deploy 🚀
36
+ if : always()
37
+ run : |
38
+
39
+ GZIP_FILE=html.meta.json.gz
40
+ S3_SUB_PATH="test-reports/${{ steps.date.outputs.date }}/${{ github.run_id }}/${{ env.REPORT_NAME }}"
41
+
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 report/${GZIP_FILE} s3://${AWS_BUCKET_NAME_TEST}/public/${S3_SUB_PATH}/${GZIP_FILE} --content-type "application/x-gzip" --metadata-directive REPLACE
47
+
48
+ echo "S3_SUB_PATH=${S3_SUB_PATH}" >> $GITHUB_ENV
49
+
50
+
51
+ - name : Add link to report in the workflow summary
31
52
if : always()
32
- with :
33
- name : ' Test results: FE unit tests'
34
- path : reports/junit.xml
35
- reporter : jest-junit
36
- list-tests : ' failed'
37
- list-suites : ' failed'
38
- fail-on-error : ' false'
53
+ run : |
54
+ link="${{ vars.DEFAULT_TEST_REPORTS_URL }}/${S3_SUB_PATH}/index.html"
55
+ echo "[${link}](${link})" >> $GITHUB_STEP_SUMMARY
0 commit comments