Skip to content

feat(orchestrator): include orchestrator namespaces in namespace-inspect #161

feat(orchestrator): include orchestrator namespaces in namespace-inspect

feat(orchestrator): include orchestrator namespaces in namespace-inspect #161

Workflow file for this run

name: PR Tests
on:
pull_request:
paths:
- 'collection-scripts/**'
- 'tests/**'
- 'Makefile'
- '.github/workflows/test.yaml'
- 'hack/deploy-k8s.sh'
branches: [main]
permissions:
checks: write
contents: read
jobs:
unit-tests:
name: Unit Tests
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
with:
fetch-depth: 0
persist-credentials: false # Critical: Do not store GITHUB_TOKEN in .git/config
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y jq yq
- name: Run unit tests
run: make test
- name: Publish Test Report
uses: mikepenz/action-junit-report@v6
if: ${{ (success() || failure()) }}
with:
report_paths: '**/test-results/*.xml'
annotate_only: ${{ github.event.pull_request.head.repo.full_name != github.repository }} # forked repo cannot write to checks so just do annotations
e2e-tests:
name: E2E Tests
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
with:
fetch-depth: 0
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y jq skopeo
# Install yq
sudo wget -qO /usr/local/bin/yq https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64
sudo chmod +x /usr/local/bin/yq
# Install oc CLI (needed for namespace-inspect)
curl -sLO https://mirror.openshift.com/pub/openshift-v4/clients/ocp/stable/openshift-client-linux.tar.gz
tar xzf openshift-client-linux.tar.gz
sudo mv oc /usr/local/bin/
rm -f openshift-client-linux.tar.gz kubectl
# Install websocat (needed for heap dump collection via inspector protocol)
curl -sLO https://github.com/vi/websocat/releases/download/v1.14.0/websocat.x86_64-unknown-linux-musl
chmod +x websocat.x86_64-unknown-linux-musl
sudo mv websocat.x86_64-unknown-linux-musl /usr/local/bin/websocat
- name: Create Kind cluster
uses: helm/kind-action@ef37e7f390d99f746eb8b610417061a60e82a6cc # v1.14.0
with:
cluster_name: rhdh-must-gather-e2e
wait: 120s
- name: Run E2E tests (local mode)
run: make test-e2e
- name: Upload E2E must-gather output in case of failure
if: ${{ failure() }}
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
with:
name: e2e-must-gather-output-pr-${{ github.event.pull_request.number }}
path: e2e-cluster.mustgather.tar.gz
retention-days: 7
- name: Upload must-gather output
if: ${{ success() || failure() }}
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
with:
name: must-gather-output-e2e
path: out/
retention-days: 5