mirror of
https://github.com/k8s-at-home/charts.git
synced 2025-02-03 07:49: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"
|
echo "::set-output name=detected::true"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
lint:
|
check_version:
|
||||||
needs:
|
needs:
|
||||||
- changes-lint
|
- changes-lint
|
||||||
if: |
|
if: |
|
||||||
!contains(github.event.head_commit.message, '[ci-skip]')
|
!contains(github.event.head_commit.message, '[ci-skip]') &&
|
||||||
&&
|
|
||||||
needs.changes-lint.outputs.detected == 'true'
|
needs.changes-lint.outputs.detected == 'true'
|
||||||
name: Lint charts
|
name: Check chart version numbers
|
||||||
strategy:
|
strategy:
|
||||||
matrix: ${{ fromJson(needs.changes-lint.outputs.matrix) }}
|
matrix: ${{ fromJson(needs.changes-lint.outputs.matrix) }}
|
||||||
fail-fast: true
|
fail-fast: true
|
||||||
@ -101,11 +100,6 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
- name: Install Helm
|
|
||||||
uses: azure/setup-helm@v1
|
|
||||||
with:
|
|
||||||
version: v3.5.3
|
|
||||||
|
|
||||||
- name: Get version
|
- name: Get version
|
||||||
id: version-get
|
id: version-get
|
||||||
run: |
|
run: |
|
||||||
@ -147,6 +141,40 @@ jobs:
|
|||||||
esac
|
esac
|
||||||
fi
|
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
|
- uses: actions/setup-python@v2
|
||||||
with:
|
with:
|
||||||
python-version: 3.7
|
python-version: 3.7
|
||||||
@ -156,23 +184,19 @@ jobs:
|
|||||||
|
|
||||||
- name: Run chart-testing (lint)
|
- name: Run chart-testing (lint)
|
||||||
id: 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
|
# Summarize matrix https://github.community/t/status-check-for-a-matrix-jobs/127354/7
|
||||||
lint_success:
|
lint_success:
|
||||||
needs:
|
needs:
|
||||||
|
- changes-lint
|
||||||
- lint
|
- lint
|
||||||
if: ${{ always() }}
|
if: ${{ always() }}
|
||||||
name: Lint successful
|
name: Lint successful
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
steps:
|
steps:
|
||||||
- name: Check lint matrix status
|
- name: Check lint matrix status
|
||||||
if: |
|
if: ${{ !contains(github.event.head_commit.message, '[ci-skip]') && needs.changes-lint.outputs.detected == 'true' && needs.lint.result != 'success' }}
|
||||||
!contains(github.event.head_commit.message, '[ci-skip]')
|
|
||||||
&&
|
|
||||||
needs.changes-lint.outputs.detected == 'true'
|
|
||||||
&&
|
|
||||||
needs.lint.result != 'success'
|
|
||||||
run: exit 1
|
run: exit 1
|
||||||
|
|
||||||
unittest:
|
unittest:
|
||||||
@ -214,6 +238,7 @@ jobs:
|
|||||||
install:
|
install:
|
||||||
needs:
|
needs:
|
||||||
- changes-install
|
- changes-install
|
||||||
|
- check_version_success
|
||||||
- lint_success
|
- lint_success
|
||||||
if: |
|
if: |
|
||||||
!contains(github.event.head_commit.message, '[ci-skip]')
|
!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
|
# Summarize matrix https://github.community/t/status-check-for-a-matrix-jobs/127354/7
|
||||||
install_success:
|
install_success:
|
||||||
needs:
|
needs:
|
||||||
|
- changes-install
|
||||||
- install
|
- install
|
||||||
if: ${{ always() }}
|
if: ${{ always() }}
|
||||||
name: Install successful
|
name: Install successful
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
steps:
|
steps:
|
||||||
- name: Check install matrix status
|
- name: Check install matrix status
|
||||||
if: |
|
if: ${{ !contains(github.event.head_commit.message, '[ci-skip]') && needs.changes-install.outputs.detected == 'true' && needs.install.result != 'success' }}
|
||||||
!contains(github.event.head_commit.message, '[ci-skip]')
|
|
||||||
&&
|
|
||||||
needs.changes-install.outputs.detected == 'true'
|
|
||||||
&&
|
|
||||||
needs.install.result != 'success'
|
|
||||||
run: exit 1
|
run: exit 1
|
||||||
|
Loading…
Reference in New Issue
Block a user