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

Run unit tests in tekton pipeline #162

Merged
merged 3 commits into from
Apr 29, 2024
Merged
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
43 changes: 43 additions & 0 deletions .tekton/frontend-operator-pull-request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading