-
Notifications
You must be signed in to change notification settings - Fork 14
64 lines (56 loc) · 1.89 KB
/
pre-submit.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# 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