Skip to content

Commit 5edc172

Browse files
committed
Adding summaries for CI workflows
Signed-off-by: apostasie <spam_blackhole@farcloser.world>
1 parent f09bcf8 commit 5edc172

File tree

9 files changed

+234
-396
lines changed

9 files changed

+234
-396
lines changed

.github/workflows/job-build.yml

Lines changed: 39 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ on:
1717
required: false
1818
default: false
1919
type: boolean
20-
2120
env:
2221
GOTOOLCHAIN: local
2322

@@ -42,10 +41,11 @@ jobs:
4241
- if: ${{ inputs.canary }}
4342
name: "Init (canary): retrieve GO_VERSION"
4443
run: |
44+
. ./hack/github/action-helpers.sh
4545
latest_go="$(. ./hack/provisioning/version/fetch.sh; go::canary::for::go-setup)"
4646
printf "GO_VERSION=%s\n" "$latest_go" >> "$GITHUB_ENV"
4747
[ "$latest_go" != "" ] || \
48-
echo "::warning title=No canary go::There is currently no canary go version to test. Steps will not run."
48+
github::log::warning "No canary go" "There is currently no canary go version to test. Steps will not run."
4949
5050
- if: ${{ env.GO_VERSION != '' }}
5151
name: "Init: install go"
@@ -56,14 +56,43 @@ jobs:
5656

5757
- if: ${{ env.GO_VERSION != '' }}
5858
name: "Run: make binaries"
59+
id: run
5960
run: |
61+
. ./hack/github/action-helpers.sh
62+
63+
github::md::table::header "OS" "Arch" "Result" "Time" >> $GITHUB_STEP_SUMMARY
64+
65+
failure=
66+
67+
build(){
68+
local goos="$1"
69+
local goarch="${2:-amd64}"
70+
local goarm="${3:-}"
71+
local result
72+
73+
github::timer::begin
74+
75+
GOOS="$goos" GOARCH="$goarch" GOARM="$goarm" make binaries \
76+
&& result="$decorator_success" \
77+
|| {
78+
failure=true
79+
result="$decorator_failure"
80+
}
81+
82+
[ ! "$goarm" ] || goarch="$goarch/v$goarm"
83+
github::md::table::line "$goos" "$goarch" "$result" "$(github::timer::format <(github::timer::tick))" >> $GITHUB_STEP_SUMMARY
84+
}
85+
6086
# We officially support these
61-
GOOS=linux make binaries
62-
GOOS=windows make binaries
63-
GOOS=freebsd make binaries
64-
GOOS=darwin make binaries
65-
GOARCH=arm GOARM=6 make binaries
87+
build linux
88+
build linux arm64
89+
build windows
90+
build freebsd
91+
build darwin
92+
build linux arm 6
6693
# These architectures are not released, but we still verify that we can at least compile
67-
GOARCH=ppc64le make binaries
68-
GOARCH=riscv64 make binaries
69-
GOARCH=s390x make binaries
94+
build linux ppc64le
95+
build linux riscv64
96+
build linux s390x
97+
98+
[ ! "$failure" ] || exit 1

.github/workflows/job-test-in-container.yml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,9 @@ jobs:
149149
echo "WORKAROUND_ISSUE_622=${WORKAROUND_ISSUE_622}" >> "$GITHUB_ENV"
150150
- name: "Run: integration tests"
151151
run: |
152+
. ./hack/github/action-helpers.sh
153+
github::md::h2 "non-flaky" >> "$GITHUB_STEP_SUMMARY"
154+
152155
# IPV6 note: nested IPv6 network inside docker and qemu is complex and needs a bunch of sysctl config.
153156
# Therefore, it's hard to debug why the IPv6 tests fail in such an isolation layer.
154157
# On the other side, using the host network is easier at configuration.
@@ -158,18 +161,21 @@ jobs:
158161
&& args=(test-integration ./hack/test-integration.sh) \
159162
|| args=(test-integration-${{ inputs.target }} /test-integration-rootless.sh ./hack/test-integration.sh)
160163
if [ "${{ inputs.ipv6 }}" == true ]; then
161-
docker run --network host -t --rm --privileged -e WORKAROUND_ISSUE_622=${WORKAROUND_ISSUE_622} "${args[@]}" -test.only-flaky=false -test.only-ipv6 -test.target=${{ inputs.binary }}
164+
docker run --network host -t --rm --privileged -e GITHUB_STEP_SUMMARY="$GITHUB_STEP_SUMMARY" -v "$GITHUB_STEP_SUMMARY":"$GITHUB_STEP_SUMMARY" -e WORKAROUND_ISSUE_622=${WORKAROUND_ISSUE_622} "${args[@]}" -test.only-flaky=false -test.only-ipv6 -test.target=${{ inputs.binary }}
162165
else
163-
docker run -t --rm --privileged -e WORKAROUND_ISSUE_622=${WORKAROUND_ISSUE_622} "${args[@]}" -test.only-flaky=false -test.target=${{ inputs.binary }}
166+
docker run -t --rm --privileged -e GITHUB_STEP_SUMMARY="$GITHUB_STEP_SUMMARY" -v "$GITHUB_STEP_SUMMARY":"$GITHUB_STEP_SUMMARY" -e WORKAROUND_ISSUE_622=${WORKAROUND_ISSUE_622} "${args[@]}" -test.only-flaky=false -test.target=${{ inputs.binary }}
164167
fi
165168
# FIXME: this NEEDS to go away
166169
- name: "Run: integration tests (flaky)"
167170
run: |
171+
. ./hack/github/action-helpers.sh
172+
github::md::h2 "flaky" >> "$GITHUB_STEP_SUMMARY"
173+
168174
[ "${{ inputs.target }}" == "rootful" ] \
169175
&& args=(test-integration ./hack/test-integration.sh) \
170176
|| args=(test-integration-${{ inputs.target }} /test-integration-rootless.sh ./hack/test-integration.sh)
171177
if [ "${{ inputs.ipv6 }}" == true ]; then
172-
docker run --network host -t --rm --privileged -e WORKAROUND_ISSUE_622=${WORKAROUND_ISSUE_622} "${args[@]}" -test.only-flaky=true -test.only-ipv6 -test.target=${{ inputs.binary }}
178+
docker run --network host -t --rm --privileged -e GITHUB_STEP_SUMMARY="$GITHUB_STEP_SUMMARY" -v "$GITHUB_STEP_SUMMARY":"$GITHUB_STEP_SUMMARY" -e WORKAROUND_ISSUE_622=${WORKAROUND_ISSUE_622} "${args[@]}" -test.only-flaky=true -test.only-ipv6 -test.target=${{ inputs.binary }}
173179
else
174-
docker run -t --rm --privileged -e WORKAROUND_ISSUE_622=${WORKAROUND_ISSUE_622} "${args[@]}" -test.only-flaky=true -test.target=${{ inputs.binary }}
180+
docker run -t --rm --privileged -e GITHUB_STEP_SUMMARY="$GITHUB_STEP_SUMMARY" -v "$GITHUB_STEP_SUMMARY":"$GITHUB_STEP_SUMMARY" -e WORKAROUND_ISSUE_622=${WORKAROUND_ISSUE_622} "${args[@]}" -test.only-flaky=true -test.target=${{ inputs.binary }}
175181
fi

.github/workflows/job-test-in-host.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,8 @@ jobs:
156156
go install ./cmd/nerdctl
157157
echo "::endgroup::"
158158
159+
choco install jq
160+
159161
- if: ${{ env.SHOULD_RUN == 'yes' }}
160162
name: "Init: install dev tools"
161163
run: |
@@ -167,15 +169,24 @@ jobs:
167169
- if: ${{ contains(inputs.runner, 'ubuntu') && env.SHOULD_RUN == 'yes' }}
168170
name: "Run (linux): integration tests (IPv6)"
169171
run: |
172+
. ./hack/github/action-helpers.sh
173+
github::md::h2 "ipv6" >> "$GITHUB_STEP_SUMMARY"
174+
170175
./hack/test-integration.sh -test.target=${{ inputs.binary }} -test.only-ipv6
171176
172177
- if: ${{ env.SHOULD_RUN == 'yes' }}
173178
name: "Run: integration tests"
174179
run: |
180+
. ./hack/github/action-helpers.sh
181+
github::md::h2 "non-flaky" >> "$GITHUB_STEP_SUMMARY"
182+
175183
./hack/test-integration.sh -test.target=${{ inputs.binary }} -test.only-flaky=false
176184
177185
# FIXME: this must go
178186
- if: ${{ env.SHOULD_RUN == 'yes' }}
179187
name: "Run: integration tests (flaky)"
180188
run: |
189+
. ./hack/github/action-helpers.sh
190+
github::md::h2 "flaky" >> "$GITHUB_STEP_SUMMARY"
191+
181192
./hack/test-integration.sh -test.target=${{ inputs.binary }} -test.only-flaky=true

.github/workflows/job-test-integration-container.yml

Lines changed: 0 additions & 200 deletions
This file was deleted.

0 commit comments

Comments
 (0)