diff --git a/.tekton/frontend-operator-pull-request.yaml b/.tekton/frontend-operator-pull-request.yaml index b6bcd44b..080235a3 100644 --- a/.tekton/frontend-operator-pull-request.yaml +++ b/.tekton/frontend-operator-pull-request.yaml @@ -182,6 +182,49 @@ spec: workspace: workspace - name: basic-auth workspace: git-auth + - name: run-unit-tests + description: run unit tests + params: + - name: SNAPSHOT + value: $(params.SNAPSHOT) + - name: NAMESPACE + value: $(params.NAMESPACE) + - name: EXPECTED_OUTPUT + value: $(params.EXPECTED_OUTPUT) + runAfter: + - clone-repository + workspaces: + - name: output + workspace: workspace + - name: basic-auth + workspace: git-auth + taskSpec: + params: + - name: SNAPSHOT + - name: NAMESPACE + - name: EXPECTED_OUTPUT + results: + - name: TEST_OUTPUT + description: Test output + steps: + - image: registry.access.redhat.com/ubi8/go-toolset:1.20.12-5.1712568462 + env: + - name: SNAPSHOT + value: $(params.SNAPSHOT) + - name: NAMESPACE + value: $(params.NAMESPACE) + - name: EXPECTED_OUTPUT + value: $(params.EXPECTED_OUTPUT) + - name: GOFLAGS + value: -buildvcs=false + script: | + #!/bin/bash + set -ex + + FEO_PATH="/workspace/output/source" + + cd ${FEO_PATH} + make test - name: prefetch-dependencies params: - name: input