Skip to content

add test workflow for upgrade #1

add test workflow for upgrade

add test workflow for upgrade #1

name: "Local Upgrade Tests"
env:
TEST_USERNAME: "test-user"
TEST_PASSWORD: "P@sswo3d"
NEBARI_IMAGE_TAG: "main"
on:
pull_request:
# release:
# types:
# - prereleased
# workflow_dispatch:
concurrency:
group: "upgrade"
cancel-in-progress: true
jobs:
test-local-upgrade:
runs-on: "cirun-runner--${{ github.run_id }}"
defaults:
run:
shell: bash -l {0}
steps:
- name: "Checkout Infrastructure"
uses: actions/checkout@main
with:
fetch-depth: 0
- name: Set up Python
uses: conda-incubator/setup-miniconda@v3
env:
CONDA: /home/runnerx/miniconda3
with:
auto-update-conda: true
python-version: "3.11"
miniconda-version: "latest"
- name: Install Nebari
run: pip install .
- name: Initialize local deployment
uses: ./.github/actions/init-local
with:
project: upgradetest
domain: upgradetest.nebari.dev
- name: Deploy Nebari
working-directory: local-deployment
run: |
nebari deploy --config nebari-config.yaml --disable-prompt
- name: Basic kubectl checks after deployment
if: always()
run: |
kubectl get all,cm,secret,pv,pvc,ing -A
- name: Check github-actions.nebari.dev resolves
run: |
nslookup github-actions.nebari.dev
- name: Curl jupyterhub login page
run: |
curl -k https://github-actions.nebari.dev/hub/home -i
- name: Create example-user
working-directory: local-deployment
run: |
nebari keycloak adduser --user "${TEST_USERNAME}" "${TEST_PASSWORD}" --config nebari-config.yaml
nebari keycloak listusers --config nebari-config.yaml
- name: Get nebari-config.yaml full path
run: echo "NEBARI_CONFIG_PATH=`realpath ./local-deployment/nebari-config.yaml`" >> "$GITHUB_ENV"