Skip to content

Merge pull request #91 from maryamtahhan/hotfix-markdown-linting #305

Merge pull request #91 from maryamtahhan/hotfix-markdown-linting

Merge pull request #91 from maryamtahhan/hotfix-markdown-linting #305

Workflow file for this run

name: "units-test"
on:
# works for mannual, in case of github agent updated.
# we can run mannually to see if it can be fixed by update version of
# - kubectl
# - k8s cluster provider's
workflow_dispatch:
pull_request:
push:
branches:
- main
- 'releases/*'
jobs:
shellcheck:
name: Shellcheck
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Run ShellCheck
uses: ludeeus/action-shellcheck@master
env:
SHELLCHECK_OPTS: -x
# test local cluster without prometheus grafana
test_local_cluster:
needs:
- shellcheck
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- cluster_provider: kind
prometheus_operator_version: v0.13.0
PROMETHEUS_ENABLE: true
GRAFANA_ENABLE: true
TEKTON_ENABLE: true
LOADPROMETHEUSIMAGE: true
steps:
- uses: actions/checkout@v3
- name: start from local
run: |
export PROMETHEUS_ENABLE=${{matrix.PROMETHEUS_ENABLE}}
export PROMETHEUS_OPERATOR_VERSION=${{matrix.prometheus_operator_version}}
export GRAFANA_ENABLE=${{matrix.GRAFANA_ENABLE}}
export CLUSTER_PROVIDER=${{matrix.cluster_provider}}
export TEKTON_ENABLE=${{matrix.TEKTON_ENABLE}}
export LOADPROMETHEUSIMAGE=${{matrix.LOADPROMETHEUSIMAGE}}
./main.sh up
- name: verify
run: |
export CLUSTER_PROVIDER=${{matrix.cluster_provider}}
./verify.sh
# test local cluster without prometheus grafana
test_precreated_cluster:
needs:
- shellcheck
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: start a cluster from local
run: |
export PROMETHEUS_ENABLE=false
export TEKTON_ENABLE=false
export LOADPROMETHEUSIMAGE=false
export CLUSTER_CONFIG=false
./main.sh up
mkdir -p /tmp/kubeconfig
cp .kube/config /tmp/kubeconfig
ls /tmp/kubeconfig
- name: config a cluster
run: |
export PROMETHEUS_ENABLE=true
export TEKTON_ENABLE=true
export LOADPROMETHEUSIMAGE=false
export KUBECONFIG_ROOT_DIR=/tmp/kubeconfig
./main.sh config
- name: verify cluster
run: |
./verify.sh verify_cluster
containertestubuntu:
needs:
- shellcheck
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- OS: ubuntu
- OS: ubi
steps:
- name: Checkout
uses: actions/checkout@v4.1.1
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
with:
image: tonistiigi/binfmt:qemu-v8.1.5
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: test image with container
uses: docker/build-push-action@v5
with:
context: .
file: ./test/${{matrix.OS}}.Dockerfile
platforms: linux/amd64
#,linux/arm64,linux/s390x later
push: false
tags: testcontainer:latest