mirror of
https://github.com/k8s-at-home/charts.git
synced 2025-02-02 23:39:03 +00:00
[CI] Unparalleled lint (#756)
This commit is contained in:
parent
56a328e8cb
commit
1726590f14
65
.github/workflows/charts-lint-test.yaml
vendored
65
.github/workflows/charts-lint-test.yaml
vendored
@ -82,14 +82,13 @@ jobs:
|
||||
echo "::set-output name=detected::true"
|
||||
fi
|
||||
|
||||
lint:
|
||||
check_version:
|
||||
needs:
|
||||
- changes-lint
|
||||
if: |
|
||||
!contains(github.event.head_commit.message, '[ci-skip]')
|
||||
&&
|
||||
!contains(github.event.head_commit.message, '[ci-skip]') &&
|
||||
needs.changes-lint.outputs.detected == 'true'
|
||||
name: Lint charts
|
||||
name: Check chart version numbers
|
||||
strategy:
|
||||
matrix: ${{ fromJson(needs.changes-lint.outputs.matrix) }}
|
||||
fail-fast: true
|
||||
@ -101,11 +100,6 @@ jobs:
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Install Helm
|
||||
uses: azure/setup-helm@v1
|
||||
with:
|
||||
version: v3.5.3
|
||||
|
||||
- name: Get version
|
||||
id: version-get
|
||||
run: |
|
||||
@ -147,6 +141,40 @@ jobs:
|
||||
esac
|
||||
fi
|
||||
|
||||
# Summarize matrix https://github.community/t/status-check-for-a-matrix-jobs/127354/7
|
||||
check_version_success:
|
||||
needs:
|
||||
- changes-lint
|
||||
- check_version
|
||||
if: ${{ always() }}
|
||||
name: Version check successful
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- name: Check Version matrix status
|
||||
if: ${{ !contains(github.event.head_commit.message, '[ci-skip]') && needs.changes-lint.outputs.detected == 'true' && needs.check_version.result != 'success' }}
|
||||
run: |
|
||||
exit 1
|
||||
|
||||
lint:
|
||||
needs:
|
||||
- changes-lint
|
||||
if: |
|
||||
!contains(github.event.head_commit.message, '[ci-skip]')
|
||||
&&
|
||||
needs.changes-lint.outputs.detected == 'true'
|
||||
name: Lint charts
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Install Helm
|
||||
uses: azure/setup-helm@v1
|
||||
with:
|
||||
version: v3.5.3
|
||||
|
||||
- uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: 3.7
|
||||
@ -156,23 +184,19 @@ jobs:
|
||||
|
||||
- name: Run chart-testing (lint)
|
||||
id: lint
|
||||
run: ct lint --config .github/ct-lint.yaml --charts ${{ matrix.chart }}
|
||||
run: ct lint --config .github/ct-lint.yaml
|
||||
|
||||
# Summarize matrix https://github.community/t/status-check-for-a-matrix-jobs/127354/7
|
||||
lint_success:
|
||||
needs:
|
||||
- changes-lint
|
||||
- lint
|
||||
if: ${{ always() }}
|
||||
name: Lint successful
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- name: Check lint matrix status
|
||||
if: |
|
||||
!contains(github.event.head_commit.message, '[ci-skip]')
|
||||
&&
|
||||
needs.changes-lint.outputs.detected == 'true'
|
||||
&&
|
||||
needs.lint.result != 'success'
|
||||
if: ${{ !contains(github.event.head_commit.message, '[ci-skip]') && needs.changes-lint.outputs.detected == 'true' && needs.lint.result != 'success' }}
|
||||
run: exit 1
|
||||
|
||||
unittest:
|
||||
@ -214,6 +238,7 @@ jobs:
|
||||
install:
|
||||
needs:
|
||||
- changes-install
|
||||
- check_version_success
|
||||
- lint_success
|
||||
if: |
|
||||
!contains(github.event.head_commit.message, '[ci-skip]')
|
||||
@ -254,16 +279,12 @@ jobs:
|
||||
# Summarize matrix https://github.community/t/status-check-for-a-matrix-jobs/127354/7
|
||||
install_success:
|
||||
needs:
|
||||
- changes-install
|
||||
- install
|
||||
if: ${{ always() }}
|
||||
name: Install successful
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- name: Check install matrix status
|
||||
if: |
|
||||
!contains(github.event.head_commit.message, '[ci-skip]')
|
||||
&&
|
||||
needs.changes-install.outputs.detected == 'true'
|
||||
&&
|
||||
needs.install.result != 'success'
|
||||
if: ${{ !contains(github.event.head_commit.message, '[ci-skip]') && needs.changes-install.outputs.detected == 'true' && needs.install.result != 'success' }}
|
||||
run: exit 1
|
||||
|
Loading…
Reference in New Issue
Block a user