Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: refer correct tekton task yamls in tests #1918

Merged
merged 1 commit into from
Aug 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/workflows/test-unit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ jobs:
java-version: ${{ matrix.java }}
- name: Core Unit Tests
run: make test
env:
FUNC_REPO_REF: ${{ github.event.pull_request.head.repo.full_name }}
FUNC_REPO_BRANCH_REF: ${{ github.head_ref }}
- name: Template Unit Tests
run: make test-templates
- uses: codecov/codecov-action@v3
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ $(BIN): $(CODE)
env CGO_ENABLED=0 go build -ldflags $(LDFLAGS) ./cmd/$(BIN)

test: $(CODE) ## Run core unit tests
go test -race -cover -coverprofile=coverage.txt ./...
go test -ldflags $(LDFLAGS) -race -cover -coverprofile=coverage.txt ./...

.PHONY: check
check: $(BIN_GOLANGCI_LINT) ## Check code quality (lint)
Expand Down
9 changes: 6 additions & 3 deletions test/presubmit-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,10 @@ export NODE_DISTRO=linux-x64

export KNATIVE_SERVING_VERSION=${KNATIVE_SERVING_VERSION:-latest}
export KNATIVE_EVENTING_VERSION=${KNATIVE_EVENTING_VERSION:-latest}
source $(dirname $0)/../vendor/knative.dev/hack/presubmit-tests.sh
source "$(dirname "$0")/../vendor/knative.dev/hack/presubmit-tests.sh"

FUNC_REPO_BRANCH_REF="${PULL_PULL_SHA}"
export FUNC_REPO_BRANCH_REF

function post_build_tests() {
local failed=0
Expand Down Expand Up @@ -71,7 +74,7 @@ function unit_tests() {
make test || failed=1
if (( failed )); then
results_banner "Unit tests failed"
exit ${failed}
exit "${failed}"
fi
template_tests
}
Expand All @@ -81,7 +84,7 @@ function template_tests() {
make test-templates || failed=2
if (( failed )); then
results_banner "Built-in template tests failed"
exit ${failed}
exit "${failed}"
fi
}

Expand Down
Loading