Skip to content

feat: validate Kptfile Inventory and Upstream #6050

feat: validate Kptfile Inventory and Upstream

feat: validate Kptfile Inventory and Upstream #6050

Workflow file for this run

# Copyright 2021, 2026 The kpt Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Live E2E Tests using bash script.
#
# Do not use workflow-level paths-ignore for required checks.
# GitHub leaves skipped required workflows Pending forever.
# Instead, we always run the workflow and skip individual jobs conditionally.
name: Live E2E
on:
pull_request:
push:
branches:
- '!dependabot/*'
jobs:
# Detect which path groups changed to conditionally skip expensive jobs.
changes:
name: detect changes
runs-on: ubuntu-latest
outputs:
live: ${{ steps.filter.outputs.live }}
steps:
- uses: actions/checkout@v6
- uses: dorny/paths-filter@v4
id: filter
with:
filters: |
live:
- 'api/**'
- 'commands/live/**'
- 'commands/pkg/**'
- 'e2e/live/**'
- 'pkg/**'
- 'go.mod'
- 'go.sum'
- '.github/workflows/e2eEnvironment.yml'
live-e2e:
name: live-e2e-k8s${{ matrix.k8s }}
needs: changes
if: needs.changes.outputs.live == 'true'
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- k8s: "1.35"
- k8s: "1.36"
steps:
- name: Checkout code
uses: actions/checkout@v6
- name: Set up Go
uses: actions/setup-go@v6
with:
go-version-file: go.mod
- name: Install Kind
uses: helm/kind-action@v1
with:
version: v0.32.0
install_only: true
- name: Run Tests
env:
K8S_VERSION: ${{ matrix.k8s }}
run: |
./e2e/live/end-to-end-test.sh -k $K8S_VERSION
live-e2e-gate:
name: live-e2e
needs: [changes, live-e2e]
if: always()
runs-on: ubuntu-latest
steps:
- name: Check results
run: |
# If no live changes, this check is not applicable, pass.
if [ "${{ needs.changes.result }}" != "success" ]; then
echo "changes job did not succeed"
exit 1
fi
if [ "${{ needs.changes.outputs.live }}" = "false" ]; then
echo "No live changes, skipping Live E2E tests"
exit 0
fi
# If any required job did not succeed, fail this check.
if [ "${{ needs.live-e2e.result }}" != "success" ]; then
echo "Live E2E tests failed or did not complete"
exit 1
fi
echo "Live E2E tests passed"