Skip to content

Merge pull request #8 from minrk/rbac #31

Merge pull request #8 from minrk/rbac

Merge pull request #8 from minrk/rbac #31

# 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-20.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.19
- k3s-channel: v1.16
steps:
- uses: actions/checkout@v2
- name: Install helm
run: |
curl https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 | bash
- name: Lint chart's templates
run: |
helm lint ./kbatch --strict --values kbatch/values.yaml
- name: Validate chart's templates can render
run: |
helm template ./kbatch --values kbatch/values.yaml 1>/dev/null
# Starts a k8s cluster with NetworkPolicy enforcement and installs kubectl
#
# ref: https://github.com/jupyterhub/action-k3s-helm/
- uses: jupyterhub/action-k3s-helm@v1
with:
k3s-channel: ${{ matrix.k3s-channel }}
metrics-enabled: false
traefik-enabled: false
docker-enabled: false
- 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()