Skip to content

Commit

Permalink
Try this
Browse files Browse the repository at this point in the history
  • Loading branch information
jveski committed Nov 17, 2023
1 parent 98ce623 commit 0474477
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions .github/workflows/k8scompat.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,25 +36,21 @@ jobs:
go-version: '1.21'

- name: Download kubebuilder assets
id: kubebuilder-assets
run: |
echo "dir=$(go run sigs.k8s.io/controller-runtime/tools/setup-envtest@latest use -p path $APISERVER_VERSION)" >> $GITHUB_OUTPUT
echo "upstream-dir=$(go run sigs.k8s.io/controller-runtime/tools/setup-envtest@latest use -p path ${{ matrix.upstreamApiserverVersion }})" >> $GITHUB_OUTPUT
echo "KUBEBUILDER_ASSETS=$(go run sigs.k8s.io/controller-runtime/tools/setup-envtest@latest use -p path $APISERVER_VERSION)" >> $GITHUB_ENV
echo "UPSTREAM_KUBEBUILDER_ASSETS=$(go run sigs.k8s.io/controller-runtime/tools/setup-envtest@latest use -p path ${{ matrix.upstreamApiserverVersion }})" >> $GITHUB_ENV
- name: Cache kubebuilder assets
uses: actions/cache@v2
with:
path: ${{ steps.kubebuilder-assets.dir }}
path: ${{ env.KUBEBUILDER_ASSETS }}
key: ${{ env.APISERVER_VERSION }}

- name: Cache upstream kubebuilder assets
uses: actions/cache@v2
with:
path: ${{ steps.kubebuilder-assets.upstream-dir }}
path: ${{ env.UPSTREAM_KUBEBUILDER_ASSETS }}
key: ${{ matrix.upstreamApiserverVersion }}

- name: Run tests
run: go test -v ./internal/controllers/reconciliation
env:
KUBEBUILDER_ASSETS: ${{ steps.kubebuilder-assets.dir }}
UPSTREAM_KUBEBUILDER_ASSETS: ${{ steps.kubebuilder-assets.upstream-dir }}

0 comments on commit 0474477

Please sign in to comment.