|
| 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