Skip to content

WIP: Validate individual tasks/stepactions #10

WIP: Validate individual tasks/stepactions

WIP: Validate individual tasks/stepactions #10

Workflow file for this run

name: Run Task Tests
"on":
pull_request
jobs:
run-task-tests:
runs-on: ubuntu-22.04
steps:
- name: Get all changed files related to task and test
id: changed-files
uses: tj-actions/changed-files@v45
with:
# Avoid using single or double quotes for multiline patterns
files: |
task/**
test/**
- name: Free Disk Space
if: steps.changed-files.outputs.any_changed == 'true'
uses: jlumbroso/free-disk-space@main
with:
tool-cache: false
docker-images: false
- name: Checkout build-defintions Repository
if: steps.changed-files.outputs.any_changed == 'true'
uses: actions/checkout@v3
with:
ref: "${{ github.event.pull_request.head.sha }}"
path: build-definitions
- name: Checkout konflux-ci/konflux-ci Repository
if: steps.changed-files.outputs.any_changed == 'true'
uses: actions/checkout@v3
with:
repository: 'konflux-ci/konflux-ci'
path: konflux-ci
- name: Create k8s Kind Cluster
if: steps.changed-files.outputs.any_changed == 'true'
uses: helm/kind-action@v1
with:
config: konflux-ci/kind-config.yaml
- name: Show version information
if: steps.changed-files.outputs.any_changed == 'true'
run: |
kubectl version
kind version
- name: Deploying Dependencies
if: steps.changed-files.outputs.any_changed == 'true'
run: |
cd $GITHUB_WORKSPACE/konflux-ci
./deploy-deps.sh
- name: Wait for the dependencies to be ready
if: steps.changed-files.outputs.any_changed == 'true'
run: |
cd $GITHUB_WORKSPACE/konflux-ci
./wait-for-all.sh
- name: Deploying Konflux
if: steps.changed-files.outputs.any_changed == 'true'
run: |
cd $GITHUB_WORKSPACE/konflux-ci
./deploy-konflux.sh
- name: List namespaces
if: steps.changed-files.outputs.any_changed == 'true'
run: |
kubectl get namespace
- name: Deploy test resources
if: steps.changed-files.outputs.any_changed == 'true'
run: |
cd $GITHUB_WORKSPACE/konflux-ci
./deploy-test-resources.sh
- name: Run git-clone task test
if: steps.changed-files.outputs.any_changed == 'true'
env:
CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }}
run: |
echo "CHANGED_FILES IN THE PR: ${CHANGED_FILES}"
cd $GITHUB_WORKSPACE/build-definitions
# ./test/run-test.sh task git-clone 0.1
./test/test-tasks.sh