add chartpress #28
Workflow file for this run
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 is a GitHub workflow defining a set of jobs with a set of steps. ref: | |
# https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-syntax-for-github-actions | |
# | |
# NOTE: Changes to this name must be followed by updates to the README.me | |
# badges. | |
name: Test kbatch chart | |
on: | |
push: | |
paths: ["kbatch/**", "chartpress.yaml", "**/test-kbatch-chart.yml", "ci/common"] | |
branches-ignore: | |
- "upgrade-**" | |
pull_request: | |
paths: ["kbatch/**", "chartpress.yaml", "**/test-kbatch-chart.yml", "ci/common"] | |
workflow_dispatch: | |
defaults: | |
run: | |
shell: bash | |
jobs: | |
test-install-chart: | |
runs-on: ubuntu-22.04 | |
strategy: | |
# Keep running even if one variation of the job fail | |
fail-fast: false | |
matrix: | |
# We run this job multiple times with different parameterization | |
# specified below, these parameters have no meaning on their own and | |
# gain meaning on how job steps use them. | |
# | |
# k3s-version: https://github.com/rancher/k3s/tags | |
# k3s-channel: https://update.k3s.io/v1-release/channels | |
include: | |
- k3s-channel: v1.20 | |
- k3s-channel: v1.23 | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
# chartpress requires git history to set chart version and image tags | |
# correctly | |
fetch-depth: 0 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: "3.11" | |
cache: pip | |
- name: Install dependencies | |
run: | | |
pip install -r requirements.txt | |
pip freeze | |
- name: Render chartpress | |
run: | | |
chartpress | |
# Starts a k8s cluster with NetworkPolicy enforcement and installs kubectl | |
# | |
# ref: https://github.com/jupyterhub/action-k3s-helm/ | |
- uses: jupyterhub/action-k3s-helm@v4 | |
with: | |
k3s-channel: ${{ matrix.k3s-channel }} | |
metrics-enabled: false | |
traefik-enabled: false | |
docker-enabled: true | |
- name: Lint chart's templates | |
run: | | |
helm lint ./kbatch --strict --values kbatch/values.yaml | |
- name: Validate charts' rendered templates are valid k8s resources | |
run: | | |
helm template ./kbatch --validate --values kbatch/values.yaml 1>/dev/null | |
- name: Install chart and await readiness | |
run: | | |
helm install kbatch ./kbatch --values kbatch/values.yaml | |
. ci/common | |
full_namespace_await | |
# GitHub Action reference: https://github.com/jupyterhub/action-k8s-namespace-report | |
- name: Kubernetes namespace report | |
uses: jupyterhub/action-k8s-namespace-report@v1 | |
if: always() |