1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2025-03-05 07:26:55 +00:00

fix: CLI tests (#7596)

* fix: CLI tests

Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>

* fix

Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>

---------

Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
This commit is contained in:
Charles-Edouard Brétéché 2023-06-20 14:04:06 +02:00 committed by GitHub
parent a068879be1
commit 74f2cb3076
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 3 deletions

View file

@ -3,7 +3,8 @@ name: cli
on:
push:
branches:
- '*'
- 'main'
- 'release*'
pull_request:
branches:
- 'main'
@ -30,10 +31,10 @@ jobs:
run: |
if [[ ${{ github.event_name }} == "push" ]]
then
export TEST_GIT_BRANCH=${GITHUB_REF##*/}
echo "TEST_GIT_BRANCH=${GITHUB_REF##*/}" >> $GITHUB_ENV
elif [[ ${{ github.event_name }} == "pull_request" ]]
then
export TEST_GIT_BRANCH=${{ github.event.pull_request.base.ref }}
echo "TEST_GIT_BRANCH=${{ github.event.pull_request.base.ref }}" >> $GITHUB_ENV
fi
- name: Test CLI
run: |

View file

@ -644,6 +644,7 @@ test-cli: test-cli-policies test-cli-local test-cli-local-mutate test-cli-local-
.PHONY: test-cli-policies
test-cli-policies: $(CLI_BIN)
@echo Testing against branch $(TEST_GIT_BRANCH)...
@$(CLI_BIN) test https://github.com/kyverno/policies/$(TEST_GIT_BRANCH)
.PHONY: test-cli-local