Skip to content

Merge pull request #129 from razo7/scorecard-testing-nmo #487

Merge pull request #129 from razo7/scorecard-testing-nmo

Merge pull request #129 from razo7/scorecard-testing-nmo #487

Workflow file for this run

# Understanding the workflow file - https://docs.github.com/en/actions/learn-github-actions/understanding-github-actions#understanding-the-workflow-file
name: Pre Submit # workflow name
on: # on events
push:
branches:
- main
- release-*
pull_request:
branches:
- main
- release-*
jobs: # jobs to run
build:
name: Test and build PRs
runs-on: ubuntu-22.04 # https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#choosing-github-hosted-runners
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Run checks and unit tests
run: make check
- name: Build images
run: make container-build-community
scorecard-k8s:
name: Test Scorecard Tests # https://sdk.operatorframework.io/docs/testing-operators/scorecard/
runs-on: ubuntu-22.04
env:
# see https://github.com/kubernetes-sigs/kind/tags
KIND_VERSION: v0.22.0
# see https://hub.docker.com/r/kindest/node/tags for available versions!
K8S_VERSION: v1.27.11
NMO_VERSION: 0.18.0
NMO_PREVIOUS_VERSION: 0.17.0
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Start kind cluster
uses: container-tools/kind-action@v2
with:
version: ${{env.KIND_VERSION}}
config: ./hack/kind-scorecard-config.yaml
node_image: kindest/node:${{env.K8S_VERSION}}
kubectl_version: ${{env.K8S_VERSION}}
registry: true
- name: Cluster info
run: |
kubectl version -o=yaml
kubectl cluster-info
kubectl get nodes -o=wide
- name: Build bundle-community
run: PREVIOUS_VERSION=${{env.NMO_PREVIOUS_VERSION}} VERSION=${{env.NMO_VERSION}} make bundle-community
- name: Run scorecard tests
run: OPERATOR_NAMESPACE=default make test-scorecard