Skip to content

Commit

Permalink
fix pipeline if the release is empty
Browse files Browse the repository at this point in the history
  • Loading branch information
Juan Manuel "Kang" Perez authored and kang-makes committed Jun 18, 2024
1 parent 811cdc0 commit 4d0e4fb
Showing 1 changed file with 22 additions and 19 deletions.
41 changes: 22 additions & 19 deletions .github/workflows/lint-and-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,24 +8,6 @@ on:
workflow_dispatch:

jobs:
chart-unittest:
name: Unit test Helm charts
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install helm-unittest plugin
run: helm plugin install https://github.com/helm-unittest/helm-unittest
- name: Run unit tests
run: |
for chart in charts/*; do
if [ -d "$chart/tests/" ]; then
helm unittest $chart -3
else
echo "::warning file=$chart,title=Skipping unit test for $chart::$chart does not have a tests/ folder"
fi
done
changelog-checks:
name: Test changelog correctness and get next-version
runs-on: ubuntu-latest
Expand Down Expand Up @@ -67,12 +49,33 @@ jobs:
id: version
uses: newrelic/release-toolkit/next-version@v1

chart-unittest:
name: Unit test Helm charts
runs-on: ubuntu-latest
needs:
- changelog-checks
if: ${{ needs.changelog-checks.outputs.skip-release != 'true' }}
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install helm-unittest plugin
run: helm plugin install https://github.com/helm-unittest/helm-unittest
- name: Run unit tests
run: |
for chart in charts/*; do
if [ -d "$chart/tests/" ]; then
helm unittest $chart -3
else
echo "::warning file=$chart,title=Skipping unit test for $chart::$chart does not have a tests/ folder"
fi
done
chart-lint:
name: Lint Helm charts
runs-on: ubuntu-latest
needs:
# Lint charts using the next version.
- changelog-checks
if: ${{ needs.changelog-checks.outputs.skip-release != 'true' }}
steps:
- name: Checkout code
uses: actions/checkout@v4
Expand Down

0 comments on commit 4d0e4fb

Please sign in to comment.