diff --git a/.github/workflows/flux-local-diff.yaml b/.github/workflows/flux-local-diff.yaml index 5e87bcea..fddae090 100644 --- a/.github/workflows/flux-local-diff.yaml +++ b/.github/workflows/flux-local-diff.yaml @@ -17,6 +17,11 @@ jobs: matrix: cluster_path: - tests/testdata/cluster + - tests/testdata/cluster2 + - tests/testdata/cluster3 + - tests/testdata/cluster4 + - tests/testdata/cluster5 + - tests/testdata/cluster6 resource: - helmrelease - kustomization @@ -30,6 +35,7 @@ jobs: resource: ${{ matrix.resource }} debug: true sources: cluster=tests/testdata/cluster3 + api-versions: batch/v1/CronJob - name: PR Comments uses: mshick/add-pr-comment@v2 if: ${{ steps.diff.outputs.diff != '' }} diff --git a/.github/workflows/flux-local-test.yaml b/.github/workflows/flux-local-test.yaml index 848039ea..9c4c79e2 100644 --- a/.github/workflows/flux-local-test.yaml +++ b/.github/workflows/flux-local-test.yaml @@ -12,6 +12,15 @@ on: jobs: build: runs-on: ubuntu-latest + strategy: + matrix: + cluster_path: + - tests/testdata/cluster + - tests/testdata/cluster2 + - tests/testdata/cluster3 + - tests/testdata/cluster5 + - tests/testdata/cluster4 + - tests/testdata/cluster6 steps: - uses: actions/checkout@v3 - uses: ./action/test @@ -19,3 +28,5 @@ jobs: enable-helm: true enable-kyverno: false sources: cluster=tests/testdata/cluster3 + path: ${{ matrix.cluster_path }} + api-versions: batch/v1/CronJob diff --git a/action/diff/action.yml b/action/diff/action.yml index 74512825..61486b60 100644 --- a/action/diff/action.yml +++ b/action/diff/action.yml @@ -73,6 +73,11 @@ runs: run: | delimiter="$(openssl rand -hex 8)" echo "diff<<${delimiter}" >> $GITHUB_OUTPUT + if [[ "${{ inputs.resource }}" == "helmrelease" ]]; then + extra_flags="--api-versions=${{ inputs.api-versions}}" + else + extra_flags="" + fi flux-local \ --log-level ${{ inputs.debug != 'true' && 'INFO' || 'DEBUG' }} \ diff \ @@ -85,9 +90,9 @@ runs: --${{ inputs.skip-secrets != 'true' && 'no-' || '' }}skip-secrets \ --limit-bytes ${{ inputs.limit-bytes }} \ --all-namespaces \ - ${{ inputs.resource == 'helmrelease' && join('--api-versions=', inputs.api-versions) || '' }} \ --kustomize-build-flags="${{ inputs.kustomize-build-flags }}" \ --sources "${{ inputs.sources }}" \ + ${extra_flags} \ >> $GITHUB_OUTPUT echo "${delimiter}" >> $GITHUB_OUTPUT shell: bash diff --git a/flux_local/tool/test.py b/flux_local/tool/test.py index 4385baee..bb719c65 100644 --- a/flux_local/tool/test.py +++ b/flux_local/tool/test.py @@ -389,8 +389,6 @@ async def run( # type: ignore[no-untyped-def] enable_kyverno: bool, test_path: str | None, verbosity: int, - kube_version: str | None, - api_versions: str | None, **kwargs, # pylint: disable=unused-argument ) -> None: """Async Action implementation."""