Skip to content

Improve charts integration test ci #25

Improve charts integration test ci

Improve charts integration test ci #25

# Copyright (C) 2024 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
name: Charts Integration Test
on:
pull_request:
branches: [main]
types: [opened, reopened, ready_for_review, synchronize] # added `ready_for_review` since draft is skipped
paths:
- helm-charts/**
- .github/workflows/scripts/chart-integration/**
workflow_dispatch:
# If there is a new commit, the previous jobs will be canceled
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
env:
CHARTS_DIR: "helm-charts"
jobs:
charts-integration:
runs-on: inspur-icx-1
permissions:
contents: write
actions: write
packages: write
steps:
- name: Checkout out Repo
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Helm install
run: |
changed_charts=$(git diff --name-only ${{ github.event.pull_request.base.sha }} ${{ github.event.pull_request.head.sha }} | grep '^helm-charts/' | cut -d'/' -f2 | sort -u)
echo "Changed subfolders: $changed_charts"
for chart in $changed_charts; do
# ignore common and README.md in the helm-charts
if [ "$chart" == "common" ] || [ "$chart" == "README.md" ]; then
continue
fi
cd "helm-charts/$chart"
../../.github/workflows/scripts/chart-integration/chart-test.sh $chart
cd ../..
done