Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle skipped checks #355

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 36 additions & 10 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,27 +7,18 @@ on:
- "release-*"
tags:
- "v[0-9]+.[0-9]+.[0-9]+"
paths-ignore:
- '**.adoc'
- '**.md'
- 'samples/**'
- 'LICENSE'
pull_request:
branches:
- main
- "release-*"
paths-ignore:
- '**.adoc'
- '**.md'
- 'samples/**'
- 'LICENSE'
merge_group:
types: [checks_requested]
workflow_dispatch:

jobs:
lint:
name: lint
if: ${{ needs.is_path_ignore.outputs.ignore != 'true' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand All @@ -42,6 +33,7 @@ jobs:
args: --timeout=5m
verify-code:
name: Verify code
if: ${{ needs.is_path_ignore.outputs.ignore != 'true' }}
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.21.x
Expand All @@ -57,6 +49,7 @@ jobs:
make verify-code
verify-manifests:
name: Verify manifests
if: ${{ needs.is_path_ignore.outputs.ignore != 'true' }}
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.21.x
Expand All @@ -72,6 +65,7 @@ jobs:
make verify-manifests
verify-bundle:
name: Verify bundle
if: ${{ needs.is_path_ignore.outputs.ignore != 'true' }}
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.21.x
Expand All @@ -87,6 +81,7 @@ jobs:
make verify-bundle
verify-helm-build:
name: Verify helm build
if: ${{ needs.is_path_ignore.outputs.ignore != 'true' }}
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.21.x
Expand All @@ -102,6 +97,7 @@ jobs:
make verify-helm-build
verify-imports:
name: Verify imports
if: ${{ needs.is_path_ignore.outputs.ignore != 'true' }}
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.21.x
Expand All @@ -117,6 +113,7 @@ jobs:
make verify-imports
verify-generate:
name: Verify generate
if: ${{ needs.is_path_ignore.outputs.ignore != 'true' }}
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.21.x
Expand All @@ -132,6 +129,7 @@ jobs:
make verify-generate
verify-go-mod:
name: Verify go.mod
if: ${{ needs.is_path_ignore.outputs.ignore != 'true' }}
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.21.x
Expand All @@ -147,6 +145,7 @@ jobs:
make verify-go-mod
unit_test_suite:
name: Unit Test Suite
if: ${{ needs.is_path_ignore.outputs.ignore != 'true' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand All @@ -159,6 +158,7 @@ jobs:
make test-unit
integration_test_suite:
name: Integration Test Suite
if: ${{ needs.is_path_ignore.outputs.ignore != 'true' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand All @@ -177,3 +177,29 @@ jobs:
steps:
- uses: actions/checkout@v4
- run: echo '${{ toJSON(needs) }}' | jq -e 'to_entries | all(.value.result == "success")'


is_path_ignore:
if: always()
name: Check for changes on path_ignore
outputs:
ignore: ${{ steps.is_path_ignore.outputs.ignore }}
runs-on:
- ubuntu-20.04
steps:
- name: Check out code
uses: actions/checkout@v3
with:
fetch-depth: 10
- id: check_files
name: Get changed files
uses: tj-actions/[email protected]
with:
files: |
samples/**
LICENSE
file-types: "**.adoc,**.md"
- id: set_output
if: steps.check_files.outputs.any_changed == 'true' && steps.check_files.outputs.files != steps.check_files.outputs.all_changed_files
name: Set output based on only files being changed that should be ignored
run: echo '::set-output name=ignore=true'
Loading