Skip to content

Commit 772b3ea

Browse files
authored
feat(tests): generate conformance report on demand (#2555)
1 parent c1e21e8 commit 772b3ea

File tree

2 files changed

+70
-1
lines changed

2 files changed

+70
-1
lines changed

.github/ISSUE_TEMPLATE/---release.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,15 @@ If the troubleshooting section does not contain the answer to the problem you en
3333
This will add the necessary skaffolding so that the reference is rendered correctly on docs.konghq.com.
3434

3535
Example:
36-
```
36+
37+
```sh
3738
${KUBERNETES_CONFIGURATION_REPO}/scripts/apidocs-gen/post-process-for-konghq.sh ${KUBERNETES_CONFIGURATION_REPO}/docs/gateway-operator-api-reference.md ${KONGHQ_DOCS_REPO}/app/_src/gateway-operator/reference/custom-resources/1.2.x.md
3839
```
3940

41+
## Conformance tests report
42+
43+
Trigger for released version CI workflow [Generate Kubernetes Gateway API conformance tests report](https://github.com/Kong/kong-operator/actions/workflows/conformance_tests_report.yaml), verify artifacts and submit them via pull request to [Kubernetes Gateway API Conformance Reports](https://github.com/kubernetes-sigs/gateway-api/tree/main/conformance/reports).
44+
4045
**Only for major and minor releases**:
4146

4247
- [ ] After the release tag is created, bump the `fromVersion` in the `upgrade from one before latest to latest minor` [upgrade E2E test][helm_upgrade_test] to the one before the latest minor release.
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
name: Generate Kubernetes Gateway API conformance tests report
2+
run-name: "Generate Kubernetes Gateway API conformance tests report ${{ format('ref:{0}', github.event.inputs.tag) }}"
3+
4+
on:
5+
workflow_dispatch:
6+
inputs:
7+
tag:
8+
description: The version of code to checkout (e.g. v1.2.3 or commit hash)
9+
required: false
10+
default: main
11+
12+
permissions:
13+
contents: read
14+
15+
jobs:
16+
conformance-tests:
17+
timeout-minutes: ${{ fromJSON(vars.GHA_DEFAULT_TIMEOUT) }}
18+
runs-on: ubuntu-latest
19+
strategy:
20+
fail-fast: false
21+
matrix:
22+
include:
23+
- router-flavor: traditional_compatible
24+
- router-flavor: expressions
25+
steps:
26+
- name: Harden Runner
27+
uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1
28+
with:
29+
egress-policy: audit
30+
31+
- name: Checkout repository
32+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
33+
with:
34+
fetch-depth: 1
35+
fetch-tags: true
36+
ref: ${{ github.event.inputs.tag }}
37+
38+
- uses: jdx/mise-action@be3be2260bc02bc3fbf94c5e2fed8b7964baf074 # v3.4.0
39+
with:
40+
install: false
41+
42+
- name: Setup Golang
43+
uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v6.0.0
44+
with:
45+
go-version-file: go.mod
46+
47+
- name: Run conformance tests
48+
env:
49+
TEST_KONG_ROUTER_FLAVOR: ${{ matrix.router-flavor }}
50+
# Add GITHUB_TOKEN env so that mise plugins can can access GitHub's API
51+
# authenticated and thus not get rate-limited (which causes failures).
52+
# Source ref: https://github.com/pirackr/asdf-telepresence/blob/c9eeab4d28b9851bb904c4c67239a118c8dd384d/bin/list-all#L7-L9
53+
GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
54+
run: make test.conformance
55+
56+
# Generated report should be submitted to
57+
# https://github.com/kubernetes-sigs/gateway-api/tree/main/conformance/reports
58+
# in future automate creating PR (add to release workflow).
59+
# TODO: https://github.com/Kong/kong-operator/issues/131
60+
- name: Collect conformance report
61+
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
62+
with:
63+
name: conformance-report-${{ matrix.router-flavor }}
64+
path: experimental-*-report.yaml

0 commit comments

Comments
 (0)