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:
parent
a068879be1
commit
74f2cb3076
2 changed files with 5 additions and 3 deletions
7
.github/workflows/cli.yaml
vendored
7
.github/workflows/cli.yaml
vendored
|
@ -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: |
|
||||
|
|
1
Makefile
1
Makefile
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue