-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
131 additions
and
1 deletion.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
**What this PR does / why we need it**: | ||
|
||
**Which issue this PR fixes** | ||
|
||
Fixes # | ||
|
||
**Special notes for your reviewer**: | ||
|
||
**PR Readiness Checklist**: | ||
|
||
Complete these before marking the PR as `ready to review`: | ||
|
||
- [ ] the `CHANGELOG.md` release notes have been updated to reflect significant changes |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: gomod | ||
directory: / | ||
schedule: | ||
interval: daily | ||
labels: | ||
- dependencies | ||
- package-ecosystem: github-actions | ||
directory: / | ||
schedule: | ||
interval: daily | ||
labels: | ||
- github_actions |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
name: tests | ||
run-name: tests, branch:${{ github.ref_name }}, triggered by @${{ github.actor }} | ||
|
||
concurrency: | ||
# Run only for most recent commit in PRs but for all tags and commits on main | ||
# Ref: https://docs.github.com/en/actions/using-jobs/using-concurrency | ||
group: ${{ github.workflow }}-${{ github.head_ref || github.sha }} | ||
cancel-in-progress: true | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- 'main' | ||
push: | ||
branches: | ||
- 'main' | ||
- 'release/*' | ||
tags: | ||
- '*' | ||
workflow_dispatch: {} | ||
|
||
jobs: | ||
generate: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- uses: actions/setup-go@v5 | ||
with: | ||
go-version-file: go.mod | ||
|
||
- uses: jdx/mise-action@v2 | ||
with: | ||
install: false | ||
|
||
- name: Generate | ||
run: make generate | ||
|
||
- name: Verify | ||
run: make verify.diff | ||
|
||
apply: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- uses: actions/setup-go@v5 | ||
with: | ||
go-version-file: go.mod | ||
|
||
- uses: jdx/mise-action@v2 | ||
with: | ||
install: false | ||
|
||
- name: Create k8s KinD Cluster | ||
uses: helm/[email protected] | ||
|
||
- name: Verify installing CRDs via kustomize works | ||
run: make install | ||
|
||
- name: Install and delete each sample one by one | ||
run: make test.samples | ||
|
||
# We need this step to fail the workflow if any of the previous steps failed or were cancelled. | ||
# It allows to use this particular job as a required check for PRs. | ||
# Ref: https://github.com/orgs/community/discussions/26822#discussioncomment-3305794 | ||
passed: | ||
runs-on: ubuntu-latest | ||
needs: | ||
- generate | ||
- apply | ||
if: always() | ||
steps: | ||
- if: contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') | ||
run: | | ||
echo "Some jobs failed or were cancelled." | ||
exit 1 |
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
Empty file.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#!/bin/bash | ||
|
||
set -o errexit | ||
set -o nounset | ||
set -o pipefail | ||
|
||
DIR="${1}" | ||
|
||
if git diff --quiet "${DIR}" | ||
then | ||
echo "${DIR} up to date." | ||
else | ||
echo "${DIR} appears to be out of date (make sure you've run 'make manifests' and 'make generate')" | ||
echo "Diff output:" | ||
git --no-pager diff "${DIR}" | ||
exit 1 | ||
fi |