File tree Expand file tree Collapse file tree 3 files changed +34
-1
lines changed
Expand file tree Collapse file tree 3 files changed +34
-1
lines changed Original file line number Diff line number Diff line change 1515jobs :
1616 build :
1717 runs-on : ubuntu-latest
18+ strategy :
19+ fail-fast : false
20+ matrix :
21+ node_version :
22+ - 20
23+ - 18
1824 steps :
1925 -
2026 name : Checkout
2430 uses : docker/bake-action@v5
2531 with :
2632 targets : build
33+ env :
34+ NODE_VERSION : ${{ matrix.node_version }}
Original file line number Diff line number Diff line change 2121jobs :
2222 test :
2323 runs-on : ubuntu-latest
24+ strategy :
25+ fail-fast : false
26+ matrix :
27+ node_version :
28+ - 20
29+ - 18
2430 steps :
2531 -
2632 name : Checkout
3238 targets : test-coverage
3339 env :
3440 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
41+ NODE_VERSION : ${{ matrix.node_version }}
3542 -
3643 name : Check coverage
3744 run : |
4451 -
4552 name : Upload coverage
4653 uses : codecov/codecov-action@v5
47- if : env.RUN_CODECOV == 'true'
54+ if : env.RUN_CODECOV == 'true' && matrix.node_version == env.NODE_VERSION
4855 with :
4956 files : ./coverage/clover.xml
5057 flags : unit
Original file line number Diff line number Diff line change 1212// See the License for the specific language governing permissions and
1313// limitations under the License.
1414
15+ variable "NODE_VERSION" {
16+ default = null
17+ }
18+
1519group "default" {
1620 targets = [" build" ]
1721}
@@ -24,31 +28,42 @@ group "validate" {
2428 targets = [" lint" , " vendor-validate" , " dockerfile-validate" , " license-validate" ]
2529}
2630
31+ target "_common" {
32+ args = {
33+ NODE_VERSION = NODE_VERSION
34+ }
35+ }
36+
2737target "build" {
38+ inherits = [" _common" ]
2839 dockerfile = " dev.Dockerfile"
2940 target = " build-update"
3041 output = [" ." ]
3142}
3243
3344target "format" {
45+ inherits = [" _common" ]
3446 dockerfile = " dev.Dockerfile"
3547 target = " format-update"
3648 output = [" ." ]
3749}
3850
3951target "lint" {
52+ inherits = [" _common" ]
4053 dockerfile = " dev.Dockerfile"
4154 target = " lint"
4255 output = [" type=cacheonly" ]
4356}
4457
4558target "vendor" {
59+ inherits = [" _common" ]
4660 dockerfile = " dev.Dockerfile"
4761 target = " vendor-update"
4862 output = [" ." ]
4963}
5064
5165target "vendor-validate" {
66+ inherits = [" _common" ]
5267 dockerfile = " dev.Dockerfile"
5368 target = " vendor-validate"
5469 output = [" type=cacheonly" ]
@@ -67,13 +82,15 @@ target "dockerfile-validate" {
6782}
6883
6984target "test" {
85+ inherits = [" _common" ]
7086 dockerfile = " dev.Dockerfile"
7187 target = " test"
7288 output = [" type=cacheonly" ]
7389 secret = [" id=GITHUB_TOKEN,env=GITHUB_TOKEN" ]
7490}
7591
7692target "test-coverage" {
93+ inherits = [" _common" ]
7794 dockerfile = " dev.Dockerfile"
7895 target = " test-coverage"
7996 output = [" ./coverage" ]
@@ -87,6 +104,7 @@ variable "GITHUB_REF" {
87104}
88105
89106target "publish" {
107+ inherits = [" _common" ]
90108 dockerfile = " dev.Dockerfile"
91109 args = {
92110 GITHUB_REF = GITHUB_REF
You can’t perform that action at this time.
0 commit comments