-
Notifications
You must be signed in to change notification settings - Fork 19
/
Copy pathcharts-test.yaml_k3d
142 lines (124 loc) · 4.45 KB
/
charts-test.yaml_k3d
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
# This is a GitHub workflow defining a set of jobs with a set of steps.
# ref: https://docs.github.com/en/actions/using-workflows/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/**"
- "docs-img/**"
- "**.md"
- ".github/workflows/*"
- "!.github/workflows/charts-test.yaml"
push:
paths-ignore:
- "docs/**"
- "docs-img/**"
- "**.md"
- ".github/workflows/*"
- "!.github/workflows/charts-test.yaml"
branches-ignore:
- "dependabot/**"
- "pre-commit-ci-update-config"
- "update-*"
- "vuln-scan-*"
workflow_dispatch:
jobs:
test:
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:
# FIXME: enable when we update jupyterhub version
# TODO: add more complex matrix
#- k3s-channel: latest
# test: install
#- k3s-channel: stable
# test: install
- k3s-channel: v1.20
test: install
- k3s-channel: v1.21
test: install
- k3s-channel: v1.22
test: install
- k3s-channel: v1.23
test: install
steps:
- uses: actions/checkout@v3
with:
# chartpress requires git history to set chart version and image tags
# correctly
fetch-depth: 0
# Starts a k8s cluster with NetworkPolicy enforcement and installs both
# kubectl and helm
#
# ref: https://github.com/jupyterhub/action-k3s-helm/
- uses: jupyterhub/action-k3s-helm@v3
with:
k3s-channel: ${{ matrix.k3s-channel }}
metrics-enabled: false
traefik-enabled: false
docker-enabled: true
- uses: actions/setup-python@v4
with:
python-version: "3.9"
## Install a local ACME server to fill the role of Let's Encrypt (LE). We
## do this as the HTTP challenge sent out by an ACME server must be able to
## reach the ACME client in our autohttps pod.
#- name: Install local ACME server
# run: |
# helm install pebble --repo https://jupyterhub.github.io/helm-chart/ pebble --values ./charts/coffea-casa/pebble-config.yaml
# Build our images if needed and update values.yaml with the tags
#- name: Install and run chartpress
# run: |
# pip3 install -r charts/dev-requirements.txt
# cd charts && chartpress
# env:
# DOCKER_BUILDKIT: "1"
# Generate values.schema.json from schema.yaml
#- name: Generate values.schema.json from schema.yaml
# run: |
# tools/generate-json-schema.py
- name: Await successful startup of Kubernetes workloads
uses: jupyterhub/action-k8s-await-workloads@v1
with:
timeout: 150
max-restarts: 1
- name: "Check if the Helm dependencies are pulled"
run: |
cd charts/coffea-casa && helm dependency build
- name: "Install local chart"
run: |
helm upgrade --install coffea-casa ./charts/coffea-casa --values charts/coffea-casa/values.yaml
- name: "Await local chart"
uses: jupyterhub/action-k8s-await-workloads@v2
with:
timeout: 900
max-restarts: 1
#- name: Await local chart cert acquisition
# run: |
# . ./ci/common
# await_autohttps_tls_cert_acquisition
- name: Run tests
continue-on-error: ${{ matrix.accept-failure == true }}
run: |
export HUB_URL=http://localhost:30080
pytest --verbose --color=yes ./tests-charts
# ref: 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/hub deploy/proxy