From b9bf1833b563775b98d03d9f7a6ba29a1ab4d688 Mon Sep 17 00:00:00 2001 From: Brandon Palm Date: Tue, 31 Oct 2023 11:51:19 -0500 Subject: [PATCH] Add YAML for intrusive QE OCP testing --- .github/workflows/qe-ocp-intrusive.yaml | 66 +++++++++++++++++++++++++ .github/workflows/qe-ocp.yaml | 5 +- 2 files changed, 70 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/qe-ocp-intrusive.yaml diff --git a/.github/workflows/qe-ocp-intrusive.yaml b/.github/workflows/qe-ocp-intrusive.yaml new file mode 100644 index 000000000..cbdc9cdd4 --- /dev/null +++ b/.github/workflows/qe-ocp-intrusive.yaml @@ -0,0 +1,66 @@ +name: QE OCP 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-intrusive-testing: + runs-on: qe-ocp + 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/labuser/.kube/config' + PFLT_DOCKERCONFIG: '/home/labuser/.docker/config' + TEST_TNF_IMAGE_NAME: quay.io/testnetworkfunction/cnf-certification-test + TEST_TNF_IMAGE_TAG: localtest + DOCKER_CONFIG_DIR: '/home/labuser/.docker' + + steps: + - name: Check out code + uses: actions/checkout@v4 + with: + ref: ${{ github.sha }} + + - name: Run initial setup + uses: ./.github/actions/setup + + - 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 prune docker resources + run: docker system prune -f --volumes + + - name: Preemptively delete report and config folders + shell: bash + run: | + sudo rm -rf /tmp/tnf_config/ + sudo rm -rf /tmp/tnf_report/ + + # Setup is complete. Time to run the QE tests. + - name: Run the tests + run: 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 + working-directory: cnfcert-tests-verification diff --git a/.github/workflows/qe-ocp.yaml b/.github/workflows/qe-ocp.yaml index 860283c8a..17137e491 100644 --- a/.github/workflows/qe-ocp.yaml +++ b/.github/workflows/qe-ocp.yaml @@ -1,4 +1,4 @@ -name: QE OCP Testing +name: QE OCP Intrusive Testing on: # pull_request: @@ -56,6 +56,9 @@ jobs: sudo rm -rf /tmp/tnf_config/ sudo rm -rf /tmp/tnf_report/ + - name: Preemptively prune docker resources + run: docker system prune -f --volumes + # Setup is complete. Time to run the QE tests. - name: Run the tests run: 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=true ENABLE_PARALLEL=true ENABLE_FLAKY_RETRY=true make test-features