Skip to content

fix(deps): update github.com/openshift/api digest to 6733660 (release-1.10) #6584

fix(deps): update github.com/openshift/api digest to 6733660 (release-1.10)

fix(deps): update github.com/openshift/api digest to 6733660 (release-1.10) #6584

Workflow file for this run

name: PR Test operator
on:
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
branches:
- main
- release-1.[0-9]+
jobs:
pr-validate:
name: PR Validate
runs-on: ubuntu-latest
timeout-minutes: 45
permissions:
contents: read
steps:
- name: Checkout
uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6
with:
fetch-depth: 0
# check changes in this commit for regex include and exclude matches
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@9426d40962ed5378910ee2e21d5f8c6fcbf2dd96 # v47.0.6
with:
files: |
.github/workflows/pr.yaml
Makefile
**/*.go
bundle/**
config/**
go.mod
go.sum
files_ignore: |
**/*.md
**/*.adoc
.rhdh/**
- name: Setup Go
if: steps.changed-files.outputs.any_changed == 'true'
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6
with:
go-version-file: 'go.mod'
- name: Store build timestamp
if: steps.changed-files.outputs.any_changed == 'true'
run: echo "BUILD_TIME=$(date +'%Y-%m-%dT%H:%M:%S')" >> $GITHUB_ENV
# gosec needs a "build" stage so connect it to the lint step which we always do
- name: Build
if: steps.changed-files.outputs.any_changed == 'true'
run: make lint
- name: Test
if: steps.changed-files.outputs.any_changed == 'true'
run: make test
- name: Upload coverage to Codecov
if: steps.changed-files.outputs.any_changed == 'true'
uses: codecov/codecov-action@57e3a136b779b570ffcdbf80b3bdc90e7fab3de2 # v6
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: cover.out
flags: unittests
fail_ci_if_error: false
override_commit: ${{ github.event.pull_request.head.sha }}
override_pr: ${{ github.event.number }}
- name: Create Kind cluster
if: steps.changed-files.outputs.any_changed == 'true'
uses: helm/kind-action@a1b0e391336a6ee6713a0583f8c6240d70863de3 # v1.12.0
with:
cluster_name: test-cluster
ignore_failed_clean: true
- name: Run Controller
if: steps.changed-files.outputs.any_changed == 'true'
run: |
# Need to 'make install' first, so that the necessary tool binaries (like controller-gen) can be downloaded locally.
# Otherwise, we might end up with a race condition where the tool binary is not yet downloaded,
# but the `make test` command tries to use it.
make manifests generate fmt vet install
make run &
- name: Generic Integration test
# perform it on backstage.io for speed
if: steps.changed-files.outputs.any_changed == 'true'
run: make integration-test PROFILE=backstage.io USE_EXISTING_CLUSTER=true USE_EXISTING_CONTROLLER=true
- name: RHDH specific Integration test
if: steps.changed-files.outputs.any_changed == 'true'
run: make integration-test ARGS='--focus "create default rhdh"' USE_EXISTING_CLUSTER=true USE_EXISTING_CONTROLLER=true
- name: Run Gosec Security Scanner
if: steps.changed-files.outputs.any_changed == 'true'
run: make gosec
# Gosec results are available in workflow logs
# SonarCloud provides Code Scanning integration in the Security tab