Skip to content

chore(tests): added makefiles for testing workflow tests locally #1059

chore(tests): added makefiles for testing workflow tests locally

chore(tests): added makefiles for testing workflow tests locally #1059

Workflow file for this run

name: KFP Tekton backend unit tests
on:
push:
branches: [master]
# Run tests for any PRs which change the backend code
pull_request:
paths:
- '.github/workflows/backend.yml'
- 'go.mod'
- 'backend/**'
- '.github/resources/**'
- 'manifests/kustomize/**'
env:
GITHUB_ACTION: "true"
SETUPTOOLS_USE_DISTUTILS: "stdlib"
jobs:
run-go-unittests:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
- name: "run go unit tests"
run: go test -v -cover ./backend/...
backend-integration:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python 3.9
uses: actions/setup-python@v4
with:
python-version: '3.9'
- name: Install sdk
run: |
make setup-backend-test
- name: Create KFP cluster
uses: ./.github/actions/kfp-tekton-cluster
- name: "flip coin test"
run: |
make test-backend-test-flip-coin
- name: "static loop test"
run: |
make test-backend-test-static-loop
- name: "dynamic loop test"
run: |
make test-backend-test-dynamic-loop
- name: "use env"
run: |
make test-backend-test-env
- name: "use volume"
run: |
make test-backend-test-volume
- name: Collect test results
if: always()
uses: actions/upload-artifact@v4
with:
name: kfp-tekton-backend-artifacts
path: /tmp/tmp.*/*