Skip to content

Commit bb62e49

Browse files
committed
ci: test workflow and codecov config
Signed-off-by: CrazyMax <[email protected]>
1 parent 3ef11ca commit bb62e49

File tree

5 files changed

+53
-15
lines changed

5 files changed

+53
-15
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,14 @@ name: ci
22

33
on:
44
schedule:
5-
- cron: '0 10 * * *' # everyday at 10am
5+
- cron: '0 10 * * *'
66
push:
77
branches:
88
- 'master'
99
- 'releases/v*'
1010
tags:
1111
- 'v*'
1212
pull_request:
13-
branches:
14-
- 'master'
15-
- 'releases/v*'
1613

1714
jobs:
1815
main:
@@ -40,9 +37,6 @@ jobs:
4037
-
4138
name: Available platforms
4239
run: echo ${{ steps.qemu.outputs.platforms }}
43-
-
44-
name: Dump context
45-
uses: crazy-max/ghaction-dump-context@v1
4640

4741
error:
4842
runs-on: ubuntu-latest
@@ -67,7 +61,3 @@ jobs:
6761
echo "::error::Should have failed"
6862
exit 1
6963
fi
70-
-
71-
name: Dump context
72-
if: always()
73-
uses: crazy-max/ghaction-dump-context@v1

.github/workflows/test.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: test
2+
3+
on:
4+
push:
5+
branches:
6+
- 'master'
7+
- 'releases/v*'
8+
pull_request:
9+
10+
jobs:
11+
test:
12+
runs-on: ubuntu-latest
13+
steps:
14+
-
15+
name: Checkout
16+
uses: actions/checkout@v3
17+
-
18+
name: Test
19+
uses: docker/bake-action@v2
20+
with:
21+
targets: test
22+
-
23+
name: Upload coverage
24+
uses: codecov/codecov-action@v3
25+
with:
26+
file: ./coverage/clover.xml

.github/workflows/validate.yml

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,30 @@ on:
66
- 'master'
77
- 'releases/v*'
88
pull_request:
9-
branches:
10-
- 'master'
11-
- 'releases/v*'
129

1310
jobs:
11+
prepare:
12+
runs-on: ubuntu-latest
13+
outputs:
14+
targets: ${{ steps.targets.outputs.matrix }}
15+
steps:
16+
-
17+
name: Checkout
18+
uses: actions/checkout@v3
19+
-
20+
name: Targets matrix
21+
id: targets
22+
run: |
23+
echo "matrix=$(docker buildx bake validate --print | jq -cr '.group.validate.targets')" >> $GITHUB_OUTPUT
24+
1425
validate:
1526
runs-on: ubuntu-latest
27+
needs:
28+
- prepare
29+
strategy:
30+
fail-fast: false
31+
matrix:
32+
target: ${{ fromJson(needs.prepare.outputs.targets) }}
1633
steps:
1734
-
1835
name: Checkout
@@ -21,4 +38,4 @@ jobs:
2138
name: Validate
2239
uses: docker/bake-action@v2
2340
with:
24-
targets: validate
41+
targets: ${{ matrix.target }}

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
[![GitHub release](https://img.shields.io/github/release/docker/setup-qemu-action.svg?style=flat-square)](https://github.com/docker/setup-qemu-action/releases/latest)
22
[![GitHub marketplace](https://img.shields.io/badge/marketplace-docker--setup--qemu-blue?logo=github&style=flat-square)](https://github.com/marketplace/actions/docker-setup-qemu)
33
[![CI workflow](https://img.shields.io/github/actions/workflow/status/docker/setup-qemu-action/ci.yml?branch=master&label=ci&logo=github&style=flat-square)](https://github.com/docker/setup-qemu-action/actions?workflow=ci)
4+
[![Test workflow](https://img.shields.io/github/actions/workflow/status/docker/setup-qemu-action/test.yml?branch=master&label=test&logo=github&style=flat-square)](https://github.com/docker/setup-qemu-action/actions?workflow=test)
5+
[![Codecov](https://img.shields.io/codecov/c/github/docker/setup-qemu-action?logo=codecov&style=flat-square)](https://codecov.io/gh/docker/setup-qemu-action)
46

57
## About
68

codecov.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
comment: false
2+
github_checks:
3+
annotations: false

0 commit comments

Comments
 (0)