-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #37 from chgl/lint-and-test-charts
[FHIR] added workflow to lint and test charts
- Loading branch information
Showing
9 changed files
with
131 additions
and
8 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
name: str() | ||
home: str() | ||
version: str() | ||
apiVersion: str() | ||
appVersion: any(str(), num(), required=False) | ||
type: str() | ||
dependencies: any(required=False) | ||
description: str() | ||
keywords: list(str(), required=False) | ||
sources: list(str(), required=False) | ||
maintainers: list(include('maintainer'), required=False) | ||
icon: str(required=False) | ||
deprecated: bool(required=False) | ||
kubeVersion: str(required=False) | ||
annotations: map(str(), str(), required=False) | ||
--- | ||
maintainer: | ||
name: str() | ||
email: str(required=False) | ||
url: str(required=False) |
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,15 @@ | ||
remote: origin | ||
target-branch: main | ||
chart-yaml-schema: .ct/chart-schema.yaml | ||
validate-maintainers: false | ||
validate-chart-schema: true | ||
validate-yaml: true | ||
check-version-increment: true | ||
chart-dirs: | ||
- charts | ||
helm-extra-args: --timeout 10m | ||
upgrade: true | ||
skip-missing-values: true | ||
release-label: release | ||
chart-repos: | ||
- bitnami=https://charts.bitnami.com/bitnami |
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,78 @@ | ||
name: Lint and Test Charts | ||
|
||
on: | ||
pull_request: | ||
branches: [main] | ||
|
||
jobs: | ||
pre-commit-check: | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- name: Install helm-docs | ||
working-directory: /tmp | ||
env: | ||
HELM_DOCS_URL: https://github.com/norwoodj/helm-docs/releases/download/v1.5.0/helm-docs_1.5.0_Linux_x86_64.tar.gz | ||
run: | | ||
curl -LSs $HELM_DOCS_URL | tar xz && \ | ||
mv ./helm-docs /usr/local/bin/helm-docs && \ | ||
chmod +x /usr/local/bin/helm-docs && \ | ||
helm-docs --version | ||
- uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.9 | ||
|
||
- name: Install pre-commit | ||
run: pip install pre-commit | ||
|
||
- uses: actions/checkout@v2 | ||
|
||
- name: run pre-commit | ||
run: pre-commit run --all-files --show-diff-on-failure | ||
|
||
lint: | ||
runs-on: ubuntu-20.04 | ||
container: quay.io/helmpack/chart-testing:v3.4.0 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Run chart-testing (lint) | ||
run: ct lint --config .ct/config.yaml | ||
|
||
test: | ||
runs-on: ubuntu-20.04 | ||
needs: | ||
- lint | ||
- pre-commit-check | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Set up Helm | ||
uses: azure/setup-helm@v1 | ||
with: | ||
version: v3.7.0 | ||
|
||
- name: Set up chart-testing | ||
uses: helm/[email protected] | ||
|
||
- name: Run chart-testing (list-changed) | ||
id: list-changed | ||
run: | | ||
changed=$(ct list-changed --config .ct/config.yaml) | ||
if [[ -n "$changed" ]]; then | ||
echo "::set-output name=changed::true" | ||
fi | ||
- name: Create k8s Kind Cluster | ||
uses: helm/[email protected] | ||
if: steps.list-changed.outputs.changed == 'true' | ||
|
||
- name: Run chart-testing (install) | ||
run: ct install --config .ct/config.yaml | ||
if: steps.list-changed.outputs.changed == 'true' |
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
repos: | ||
- repo: https://github.com/norwoodj/helm-docs | ||
rev: v1.2.0 | ||
rev: v1.5.0 | ||
hooks: | ||
- id: helm-docs | ||
args: | ||
|
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,6 @@ | ||
extends: default | ||
rules: | ||
line-length: disable | ||
document-start: disable | ||
ignore: | | ||
charts/**/templates |
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 |
---|---|---|
@@ -1,7 +1,7 @@ | ||
apiVersion: v2 | ||
description: Helm chart for the IBM FHIR Server | ||
name: ibm-fhir-server | ||
version: 0.2.0 | ||
version: 0.2.1 | ||
appVersion: 4.9.1 | ||
dependencies: | ||
- name: postgresql | ||
|
@@ -11,6 +11,8 @@ dependencies: | |
sources: | ||
- https://github.com/Alvearie/alvearie-helm | ||
- https://github.com/IBM/FHIR | ||
home: https://ibm.github.io/FHIR/ | ||
type: application | ||
maintainers: | ||
- name: Lee Surprenant | ||
email: [email protected] | ||
|
@@ -22,4 +24,6 @@ annotations: | |
# When using the list of objects option the valid supported kinds are | ||
# added, changed, deprecated, removed, fixed, and security. | ||
- kind: added | ||
description: included a PostgreSQL sub-chart to simplify out-of-the box installation | ||
description: added `home` and `type` fields to Chart.yaml | ||
- kind: changed | ||
description: set default `replicaCount` for the FHIR server pods to 1 |
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
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