-
Notifications
You must be signed in to change notification settings - Fork 59
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Yingchun Guo <[email protected]>
- Loading branch information
1 parent
ae24e81
commit 5d65855
Showing
3 changed files
with
75 additions
and
3 deletions.
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
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,71 @@ | ||
# Copyright (C) 2024 Intel Corporation | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
name: E2E test with helm charts | ||
|
||
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: | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | ||
cancel-in-progress: true | ||
|
||
env: | ||
CHARTS_DIR: "helm-charts" | ||
|
||
jobs: | ||
job1: | ||
name: Get-test-matrix | ||
runs-on: ubuntu-latest | ||
outputs: | ||
run_matrix: ${{ steps.get-test-matrix.outputs.run_matrix }} | ||
steps: | ||
- name: Checkout out Repo | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Get test matrix | ||
id: get-test-matrix | ||
run: | | ||
changed_charts=$(git diff --name-only ${{ github.event.pull_request.base.sha }} ${{ github.event.pull_request.head.sha }} | \ | ||
grep '^helm-charts/' | \ | ||
grep -vE 'README.md|common' | \ | ||
cut -d'/' -f2 | sort -u ) | ||
run_matrix="{chart:[" | ||
for chart in ${changed_charts}; do | ||
run_matrix="${run_matrix}${chart}," | ||
done | ||
run_matrix=$run_matrix"]}" | ||
echo "run_matrix=${run_matrix}" | ||
echo "run_matrix=${run_matrix}" >> $GITHUB_OUTPUT | ||
Chart-test: | ||
needs: job1 | ||
strategy: | ||
matrix: ${{ fromJSON(needs.job1.outputs.run_matrix) }} | ||
runs-on: inspur-icx-1 | ||
continue-on-error: true | ||
steps: | ||
- name: Test example | ||
run: | | ||
echo "Matrix - chart: ${{ matrix.chart }}" | ||
- name: Clean Up Working Directory | ||
run: sudo rm -rf ${{github.workspace}}/* | ||
|
||
- name: Checkout out Repo | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Run test | ||
run: | | ||
cd "helm-charts/${{ matrix.chart }}" | ||
../../.github/workflows/scripts/chart-integration/chart-test.sh ${{ matrix.chart }} |
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