This repository was archived by the owner on Apr 18, 2024. It is now read-only.
File tree 7 files changed +98
-18
lines changed
7 files changed +98
-18
lines changed Original file line number Diff line number Diff line change
1
+ # source https://github.com/actions/upload-artifact/issues/199#issuecomment-1516555821
2
+ name : Download artifact
3
+ description : Wrapper around GitHub's official action, with additional extraction before download
4
+
5
+ # https://github.com/actions/download-artifact/blob/main/action.yml
6
+ inputs :
7
+ name :
8
+ description : Artifact name
9
+ required : true
10
+ path :
11
+ description : Destination path
12
+ required : false
13
+ default : .
14
+
15
+ runs :
16
+ using : composite
17
+ steps :
18
+ - name : Download artifacts
19
+ uses : actions/download-artifact@v3
20
+ with :
21
+ name : ${{ inputs.name }}
22
+ path : ${{ inputs.path }}
23
+
24
+ - name : Extract artifacts
25
+ run : tar -xvf ${{ inputs.name }}.tar
26
+ shell : bash
27
+ working-directory : ${{ inputs.path }}
28
+
29
+ - name : Remove archive
30
+ run : rm -f ${{ inputs.name }}.tar
31
+ shell : bash
32
+ working-directory : ${{ inputs.path }}
33
+
Original file line number Diff line number Diff line change
1
+ # source https://github.com/actions/upload-artifact/issues/199#issuecomment-1516555821
2
+ name : Upload artifact
3
+ description : Wrapper around GitHub's official action, with additional archiving before upload
4
+
5
+ # https://github.com/actions/upload-artifact/blob/main/action.yml
6
+ inputs :
7
+ name :
8
+ description : Artifact name
9
+ required : true
10
+ path :
11
+ description : A file, directory or wildcard pattern that describes what to upload
12
+ required : true
13
+ if-no-files-found :
14
+ description : >
15
+ The desired behavior if no files are found using the provided path.
16
+ Available Options:
17
+ warn: Output a warning but do not fail the action
18
+ error: Fail the action with an error message
19
+ ignore: Do not output any warnings or errors, the action does not fail
20
+ required : false
21
+ default : warn
22
+ retention-days :
23
+ description : >
24
+ Duration after which artifact will expire in days. 0 means using default retention.
25
+ Minimum 1 day.
26
+ Maximum 90 days unless changed from the repository settings page.
27
+ required : false
28
+ default : ' 0'
29
+
30
+ runs :
31
+ using : composite
32
+ steps :
33
+ - name : Archive artifacts
34
+ run : tar -cvf ${{ inputs.name }}.tar ${{ inputs.path }}
35
+ shell : bash
36
+
37
+ - name : Upload artifacts
38
+ uses : actions/upload-artifact@v3
39
+ with :
40
+ if-no-files-found : ${{ inputs.if-no-files-found }}
41
+ name : ${{ inputs.name }}
42
+ path : ${{ inputs.name }}.tar
43
+ retention-days : ${{ inputs.retention-days }}
44
+
45
+ - name : Remove archive
46
+ run : rm -f ${{ inputs.name }}.tar
47
+ shell : bash
Original file line number Diff line number Diff line change 69
69
70
70
# upload this build as artifact to current Action
71
71
- name : Upload bundle
72
- uses : actions/upload-artifact@v3
72
+ uses : ./.github/ actions/upload-artifact
73
73
with :
74
74
name : LSF-${{ inputs.build_for_coverage && 'coverage-' || '' }}${{ inputs.sha }}
75
75
path : build/
Original file line number Diff line number Diff line change @@ -54,12 +54,10 @@ jobs:
54
54
run : du -d 0 -h ${{ steps.yarn-cache-dir-path.outputs.dir }}
55
55
56
56
- name : " Download bundle"
57
- uses : actions/download-artifact@v3
57
+ uses : ./.github/ actions/download-artifact
58
58
with :
59
59
name : LSF-coverage-${{ inputs.sha }}
60
60
61
- path : build/
62
-
63
61
# run http-server with build in background (will be killed after job ends)
64
62
# do this only for master branch (so only for push event)
65
63
# because pr can contain unfinished job
@@ -95,10 +93,10 @@ jobs:
95
93
yarn run test:ci ${{ steps.cpu-info.outputs.cores-count }}
96
94
97
95
- name : " Upload e2e output"
98
- uses : actions/upload-artifact@v3
96
+ uses : ./.github/ actions/upload-artifact
99
97
if : ${{ failure() }}
100
98
with :
101
- name : e2e output
99
+ name : e2e- output
102
100
path : e2e/output/
103
101
104
102
- name : Merge coverage reports
@@ -108,7 +106,7 @@ jobs:
108
106
yarn coverage:merge
109
107
110
108
- name : Upload coverage to Artifact
111
- uses : actions/upload-artifact@v3
109
+ uses : ./.github/ actions/upload-artifact
112
110
if : ${{ success() }}
113
111
with :
114
112
name : e2e-tests-coverage
Original file line number Diff line number Diff line change 67
67
run : du -d 0 -h ${{ steps.yarn-cache-dir-path.outputs.dir }}
68
68
69
69
- name : " Download bundle"
70
- uses : actions/download-artifact@v3
70
+ uses : ./.github/ actions/download-artifact
71
71
with :
72
72
name : LSF-coverage-${{ inputs.sha }}
73
- path : build/
74
73
75
74
# run http-server with build in background (will be killed after job ends)
76
75
# do this only for master branch (so only for push event)
@@ -110,8 +109,14 @@ jobs:
110
109
cd ./tests/functional
111
110
yarn run test:parallel
112
111
112
+ - name : Prepare suite output
113
+ if : ${{ failure() }}
114
+ run : |
115
+ cd ./tests/functional
116
+ rm -rf node_modules
117
+
113
118
- name : " Upload suite output"
114
- uses : actions/upload-artifact@v3
119
+ uses : ./.github/ actions/upload-artifact
115
120
if : ${{ failure() }}
116
121
with :
117
122
name : failure-result
@@ -125,7 +130,7 @@ jobs:
125
130
yarn cvg:report
126
131
127
132
- name : Upload coverage to Artifact
128
- uses : actions/upload-artifact@v3
133
+ uses : ./.github/ actions/upload-artifact
129
134
if : ${{ success() }}
130
135
with :
131
136
name : cypress-tests-coverage
Original file line number Diff line number Diff line change 20
20
uses : actions/checkout@v3
21
21
22
22
- name : " Download Unit coverage from Artifact"
23
- uses : actions/download-artifact@v3
23
+ uses : ./.github/ actions/download-artifact
24
24
with :
25
25
name : unit-tests-coverage
26
- path : coverage/
27
26
28
27
- name : Upload coverage to Codecov
29
28
43
42
uses : actions/checkout@v3
44
43
45
44
- name : " Download E2E coverage from Artifact"
46
- uses : actions/download-artifact@v3
45
+ uses : ./.github/ actions/download-artifact
47
46
with :
48
47
name : e2e-tests-coverage
49
- path : coverage/
50
48
51
49
- name : Upload coverage to Codecov
52
50
66
64
uses : actions/checkout@v3
67
65
68
66
- name : " Download Cypress coverage from Artifact"
69
- uses : actions/download-artifact@v3
67
+ uses : ./.github/ actions/download-artifact
70
68
with :
71
69
name : cypress-tests-coverage
72
- path : coverage/
73
70
74
71
- name : Upload coverage to Codecov
75
72
Original file line number Diff line number Diff line change 58
58
# token: ${{ secrets.CODECOV_TOKEN }}
59
59
- name : Upload coverage to Artifacts
60
60
if : ${{ !github.event.pull_request.head.repo.fork }}
61
- uses : actions/upload-artifact@v3
61
+ uses : ./.github/ actions/upload-artifact
62
62
with :
63
63
name : unit-tests-coverage
64
64
path : coverage/
You can’t perform that action at this time.
0 commit comments