Skip to content

CRC Tests

CRC Tests #49

Workflow file for this run

# https://developers.redhat.com/content-gateway/rest/mirror/pub/openshift-v4/clients/crc/latest/crc-linux-amd64.tar.xz
name: CRC Tests
on:
schedule:
- cron: '0 0 * * *'
workflow_dispatch:
env:
QE_REPO: redhat-best-practices-for-k8s/certsuite-qe
jobs:
build-and-store:
# build and store the image
runs-on: ubuntu-22.04
strategy:
fail-fast: false
steps:
- name: Check out code
uses: actions/checkout@v4
with:
ref: ${{ github.sha }}
- name: Setup docker buildx
uses: docker/setup-buildx-action@6524bf65af31da8d45b59e8c27de4bd072b392f5 # v3.8.0
- name: Build temporary image tag for this PR
uses: docker/build-push-action@ca877d9245402d1537745e0e356eab47c3520991 # v6.13.0
with:
context: .
file: ./Dockerfile
tags: quay.io/redhat-best-practices-for-k8s/certsuite:localtest
outputs: type=docker,dest=/tmp/testimage.tar
- name: Store image as artifact
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
with:
name: testimage
path: /tmp/testimage.tar
smoke-tests:
name: CRC QE Tests
runs-on: ubuntu-22.04
needs: build-and-store
if: needs.build-and-store.result == 'success'
strategy:
fail-fast: false
matrix:
# suite: [accesscontrol]
suite: [accesscontrol, affiliatedcertification, manageability, networking, lifecycle, performance, platformalteration, observability, operator]
env:
SHELL: /bin/bash
KUBECONFIG: '/home/runner/.crc/machines/crc/kubeconfig'
PFLT_DOCKERCONFIG: '/home/runner/.docker/config'
DOCKER_CONFIG_DIR: '/home/runner/.docker/'
TEST_CERTSUITE_IMAGE_NAME: quay.io/redhat-best-practices-for-k8s/certsuite
TEST_CERTSUITE_IMAGE_TAG: localtest
steps:
- name: Write temporary docker file
run: |
mkdir -p /home/runner/.docker
touch ${PFLT_DOCKERCONFIG}
echo '{ "auths": {} }' >> ${PFLT_DOCKERCONFIG}
if: runner.os == 'Linux'
- name: Disable default go problem matcher
run: echo "::remove-matcher owner=go::"
- name: Check out code
uses: actions/checkout@v4
with:
ref: ${{ github.sha }}
- name: check if CRC_PULL_SECRET exists, if not, exit
env:
super_secret: ${{ secrets.CRC_PULL_SECRET }}
if: ${{ env.super_secret == '' }}
run: |
echo "CRC_PULL_SECRET is not set"
exit 1
- name: Deploy the OCP Cluster
uses: palmsoftware/[email protected]
with:
ocpPullSecret: $OCP_PULL_SECRET
env:
OCP_PULL_SECRET: ${{ secrets.CRC_PULL_SECRET }}
- name: Clone the QE repository
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
repository: ${{ env.QE_REPO }}
path: certsuite-qe
ref: main
- name: Download image from artifact
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
with:
name: testimage
path: /tmp
- name: Load image into docker
run: docker load --input /tmp/testimage.tar
- name: Run the tests (against image)
uses: nick-fields/retry@7152eba30c6575329ac0576536151aca5a72780e # v3.0.0
with:
timeout_minutes: 150
max_attempts: 1
command: cd ${GITHUB_WORKSPACE}/certsuite-qe; FEATURES=${{matrix.suite}} CERTSUITE_REPO_PATH=${GITHUB_WORKSPACE} CERTSUITE_IMAGE=${{env.TEST_CERTSUITE_IMAGE_NAME}} CERTSUITE_IMAGE_TAG=${{env.TEST_CERTSUITE_IMAGE_TAG}} JOB_ID=${{github.run_id}} DISABLE_INTRUSIVE_TESTS=true ENABLE_PARALLEL=false ENABLE_FLAKY_RETRY=true make test-features