Skip to content

Update RTD config (build.os has become required) #83

Update RTD config (build.os has become required)

Update RTD config (build.os has become required) #83

Workflow file for this run

# This is a GitHub workflow defining a set of jobs with a set of steps.
# ref: https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions
#
name: Test chart
# Trigger the workflow's on all PRs and pushes so that other contributors can
# run tests in their own forks. Avoid triggering these tests on changes to
# documentation only changes.
on:
pull_request:
paths-ignore:
- "docs/**"
- "**.md"
- ".github/workflows/*"
- "!.github/workflows/test-chart.yaml"
push:
paths-ignore:
- "docs/**"
- "**.md"
- ".github/workflows/*"
- "!.github/workflows/test-chart.yaml"
branches-ignore:
- "dependabot/**"
workflow_dispatch:
jobs:
test-chart-templates:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: "3.8"
- name: Install dependencies
run: |
pip install -r dev-requirements.txt
pip list
helm version
- name: Generate values.schema.json from schema.yaml
run: helm-chart/tools/generate-json-schema.py
- name: Helm lint (values.yaml)
run: helm lint helm-chart/jupyterhub-ssh
- name: Helm lint --strict (values.yaml)
run: helm lint --strict helm-chart/jupyterhub-ssh
continue-on-error: true
- name: Helm lint (values.lint.yaml)
run: helm lint helm-chart/jupyterhub-ssh --values helm-chart/jupyterhub-ssh/values.lint.yaml
- name: Helm lint --strict (values.lint.yaml)
run: helm lint --strict helm-chart/jupyterhub-ssh
continue-on-error: true
- name: Helm template (values.yaml)
run: helm template helm-chart/jupyterhub-ssh --set hubUrl=http://hub:8081
- name: Helm template (values.lint.yaml)
run: helm template helm-chart/jupyterhub-ssh --values helm-chart/jupyterhub-ssh/values.lint.yaml
test-chart-install:
runs-on: ubuntu-20.04
timeout-minutes: 20
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.21
debuggable: debuggable
- k3s-channel: v1.20
- k3s-channel: v1.19
- k3s-channel: v1.18
- k3s-channel: v1.17
steps:
- uses: actions/checkout@v2
with:
# chartpress requires the full history
fetch-depth: 0
# Starts a k8s cluster with NetworkPolicy enforcement and installs both
# kubectl and helm
#
# action reference: 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: true
- uses: actions/setup-python@v2
with:
python-version: "3.8"
- name: Install dependencies
run: |
pip install -r dev-requirements.txt
pip list
helm version
# Build our images if needed and update values.yaml with the tags
- name: Run chartpress
run: |
cd helm-chart
chartpress
- name: Generate values.schema.json from schema.yaml
run: helm-chart/tools/generate-json-schema.py
# Validate rendered helm templates against the k8s api-server with the
# dedicated values.lint.yaml config.
- name: Helm template --validate (with lint config)
run: helm template --validate jupyterhub-ssh helm-chart/jupyterhub-ssh --values helm-chart/jupyterhub-ssh/values.lint.yaml
# FIXME: Add back when we are using pytest do test something more
# complicated than just installing the chart by itself.
# - name: Install jupyterhub
# run: helm install jupyterhub --repo https://jupyterhub.github.io/helm-chart/ jupyterhub
- name: Install jupyterhub-ssh
run: helm install jupyterhub-ssh helm-chart/jupyterhub-ssh --values helm-chart/jupyterhub-ssh/values.dev.yaml
- name: Await readiness
uses: jupyterhub/action-k8s-await-workloads@v1
with:
timeout: 150
max-restarts: 0
# FIXME: Setup pytest tests against our deployed Helm chart
#
# - name: Run tests
# run: |
# pytest --verbose --maxfail=2 --color=yes ./helm-chart/tests
# action reference: https://github.com/jupyterhub/action-k8s-namespace-report
- name: Kubernetes namespace report
uses: jupyterhub/action-k8s-namespace-report@v1
if: always()
with:
important-workloads: deploy/jupyterhub-ssh deploy/jupyterhub-sftp deploy/hub
# WARNING: Only allow this for pull_request runs that doesn't contain
# sensitive information.
#
# action reference: https://github.com/mxschmitt/action-tmate@v3
- name: To enter a SSH debugging session, read these logs
if: failure() && github.event_name == 'pull_request' && matrix.debuggable == 'debuggable'
uses: mxschmitt/action-tmate@v3