Skip to content

QE OCP 4.14 Intrusive Testing #57

QE OCP 4.14 Intrusive Testing

QE OCP 4.14 Intrusive Testing #57

name: QE OCP 4.14 Intrusive Testing
on:
# pull_request:
# branches: [ main ]
workflow_dispatch:
# Schedule a daily cron at midnight UTC
schedule:
- cron: '0 0 * * *'
env:
QE_REPO: test-network-function/cnfcert-tests-verification
jobs:
qe-ocp-414-intrusive-testing:
runs-on: qe-ocp-414
strategy:
fail-fast: false
matrix:
# Add more suites if more intrusive tests are added to the QE repo
suite: [lifecycle]
env:
SHELL: /bin/bash
KUBECONFIG: '/home/labuser2/.kube/config'
PFLT_DOCKERCONFIG: '/home/labuser2/.docker/config'
TEST_TNF_IMAGE_NAME: quay.io/testnetworkfunction/cnf-certification-test
TEST_TNF_IMAGE_TAG: localtest
DOCKER_CONFIG_DIR: '/home/labuser2/.docker'
TNF_CONFIG_DIR: '/home/labuser2/tnf_config'
TNF_REPORT_DIR: '/home/labuser2/tnf_report'
steps:
- name: Check out code
uses: actions/checkout@v4
with:
ref: ${{ github.sha }}
- name: Run initial setup
uses: ./.github/actions/setup
- name: Preemptively prune docker resources
run: docker system prune -f --volumes
- name: Build the test image
run: make build-image-local # quay.io/testnetworkfunction/cnf-certification-test:localtest
- name: Show pods
run: oc get pods -A
- name: Clone the QE repository
uses: actions/checkout@v4
with:
repository: ${{ env.QE_REPO }}
path: cnfcert-tests-verification
- name: Preemptively potential QE namespaces
run: ./scripts/delete-namespaces.sh
working-directory: cnfcert-tests-verification
- name: Preemptively delete report and config folders
shell: bash
run: |
sudo rm -rf /tmp/tnf_config/
sudo rm -rf /tmp/tnf_report/
- name: Run the tests
uses: nick-fields/retry@v2
with:
timeout_minutes: 90
max_attempts: 3
command: cd ${GITHUB_WORKSPACE}/cnfcert-tests-verification; FEATURES=${{matrix.suite}} TNF_REPO_PATH=${GITHUB_WORKSPACE} TNF_IMAGE=${{env.TEST_TNF_IMAGE_NAME}} TNF_IMAGE_TAG=${{env.TEST_TNF_IMAGE_TAG}} DISABLE_INTRUSIVE_TESTS=false ENABLE_PARALLEL=true ENABLE_FLAKY_RETRY=true make test-features
- name: (if on main and upstream) Send chat msg to dev team if failed to run QE tests
if: ${{ failure() && github.ref == 'refs/heads/main' && github.repository_owner == 'test-network-function' }}
env:
COMMIT_SHA: ${{ github.sha }}
JOB_RUN_ID: ${{ github.run_id }}
JOB_RUN_ATTEMPT: ${{ github.run_attempt }}
GITHUB_REPO: https://github.com/test-network-function/cnf-certification-test
run: |
curl -X POST --data "{
\"text\": \"🚨⚠️ Failed to run intrusive OCP 4.14 QE tests from commit \<$GITHUB_REPO/commit/$COMMIT_SHA|$COMMIT_SHA\>, job ID \<$GITHUB_REPO/actions/runs/$JOB_RUN_ID/attempts/$JOB_RUN_ATTEMPT|$JOB_RUN_ID\> \"
}" -H 'Content-type: application/json; charset=UTF-8' '${{ secrets.QE_NIGHTLY_WEBHOOK }}'