Skip to content

test: add openshift e2e smoke test #14

test: add openshift e2e smoke test

test: add openshift e2e smoke test #14

name: OpenShift compatibility — PR verification
# Temporary: verifies the harness on the runner before merging okd-test.
# Delete once main has run `OpenShift compatibility` green at least once.
on:
pull_request:
branches: [main]
paths:
- '.github/workflows/openshift-compatibility.yaml'
- '.github/workflows/openshift-compatibility-pr.yaml'
- 'test/deploy/openshift_test.go'
- 'test/deploy/deploy_test.go'
- 'test/deploy/olm_manifests.yaml.tmpl'
- 'Makefile'
permissions:
contents: read
concurrency:
group: openshift-compatibility
cancel-in-progress: false
env:
KUBECONFIG: /home/runner/okd-install/auth/kubeconfig
jobs:
compat:
if: github.event.pull_request.head.repo.full_name == github.repository
runs-on: [self-hosted, openshift, operator]
timeout-minutes: 45
steps:
- name: Checkout code
uses: actions/checkout@v6
with:
persist-credentials: false
- name: Set up Go
uses: actions/setup-go@v6
with:
go-version-file: 'go.mod'
- name: Reset cluster to baseline snapshot
run: /usr/local/bin/okd-revert.sh
- name: Verify cluster health
run: |
oc get nodes
bad=$(oc get co --no-headers \
| awk '$1 != "authentication" && $1 != "monitoring" && $1 != "image-registry" \
&& ($3 != "True" || $4 != "False" || $5 != "False") { print $1 }')
if [ -n "$bad" ]; then
echo "Unhealthy ClusterOperators: $bad"
oc get co
exit 1
fi
oc wait --for=jsonpath='{.status.conditions[?(@.type=="Available")].status}=True' \
apiservice v1.project.openshift.io --timeout=5m
- name: Install OLM tooling
run: make operator-sdk opm
- name: Run OLM compatibility e2e
env:
CLICKHOUSE_VERSION: "26.3"
run: make test-compat-e2e-olm-openshift
- name: Upload test report
if: ${{ !cancelled() }}
uses: actions/upload-artifact@v6
with:
name: openshift-compatibility-pr-report
path: "**/report/*"
if-no-files-found: warn
overwrite: true
- name: Wipe workspace
if: always()
run: rm -rf "$GITHUB_WORKSPACE/.git" "$GITHUB_WORKSPACE/_work" || true