Merge pull request #135 from razo7/fips-compliance-check #503
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |