Skip to content

Commit

Permalink
Refactors to use dotenv-action envs for min/max GW API versions
Browse files Browse the repository at this point in the history
Signed-off-by: Daneyon Hansen <[email protected]>
  • Loading branch information
danehans committed Dec 5, 2024
1 parent fbe8271 commit 1982e91
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
1 change: 1 addition & 0 deletions .github/workflows/.env/pr-tests/max_versions.env
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
k8sgateway_api_version='v1.2.0'
1 change: 1 addition & 0 deletions .github/workflows/.env/pr-tests/min_versions.env
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
k8sgateway_api_version='v1.1.0'
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
name: Conformance Tests
description: Run Kubernetes Gateway API conformance tests for multiple versions
inputs:
gateway-api-version:
description: "The version of Gateway API to test."
k8sgateway-api-version:
description: The version of the Kubernetes Gateway API CRDs to use for testing
required: true
runs:
using: "composite"
Expand Down Expand Up @@ -58,7 +58,7 @@ runs:
- name: Run the kubernetes gateway API conformance tests
shell: bash
env:
GATEWAY_API_VERSION: ${{ inputs.gateway-api-version }}
GATEWAY_API_VERSION: ${{ inputs.k8sgateway-api-version }}
run: make conformance
- name: Capture debug information when tests fail
if: ${{ failure() }}
Expand Down
14 changes: 6 additions & 8 deletions .github/workflows/conformance-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,9 @@ on:

jobs:
run-conformance-tests:
name: Conformance Tests for ${{ matrix.gateway-api-version }}
runs-on: ubuntu-latest
strategy:
matrix:
gateway-api-version: [v1.1.0, v1.2.0]
# TODO(tim): Avoid hardcoding versions here. It's a bit tricky based on
# how this was setup and there's a limited # of dispatch inputs that GH
# supports. We can revisit this later.
Expand All @@ -35,18 +33,18 @@ jobs:
- ${{ inputs.image-variant }}
version:
- ${{ inputs.version }}
k8sgateway_api_version:
- label: 'min'
file: './.github/workflows/.env/pr-tests/min_versions.env'
- label: 'max'
file: './.github/workflows/.env/pr-tests/max_versions.env'
steps:
- name: Checkout Repository
uses: actions/checkout@v4

- name: Export GATEWAY_API_VERSION
shell: bash
run: echo "GATEWAY_API_VERSION=${{ matrix.gateway-api-version }}" >> $GITHUB_ENV

- name: Run Conformance Tests
uses: ./.github/workflows/composite-actions/kube-gateway-api-conformance-tests
with:
gateway-api-version: ${{ matrix.gateway-api-version }}

k8sgateway-api-version: ${{ steps.dotenv.outputs.k8sgateway_api_version }}
# TODO(tim): Add support for downloading the test results and creating
# a pull request whenever a new release > 1.17+ is cut.
File renamed without changes.

0 comments on commit 1982e91

Please sign in to comment.