forked from nebari-dev/nebari
-
Notifications
You must be signed in to change notification settings - Fork 0
85 lines (69 loc) · 2.4 KB
/
test_local_upgrade.yaml
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
name: "Local Upgrade Tests"
on:
pull_request:
paths:
- ".github/actions/**"
- ".github/workflows/test_local_upgrade.yaml"
release:
types:
- prereleased
workflow_dispatch:
concurrency:
group: ${{ github.ref_name }}
cancel-in-progress: true
env:
NEBARI_IMAGE_TAG: "main"
jobs:
test-local-upgrade:
runs-on: "cirun-runner--${{ github.run_id }}"
defaults:
run:
shell: bash -l {0}
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup runner for local deployment
uses: ./.github/actions/setup-local
- name: Setup 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 latest stable Nebari release
run: pip install nebari
- name: Initialize Nebari config for local deployment
id: init
uses: ./.github/actions/init-local
- name: Extract old Nebari version
run: |
OLD_NEBARI_VERSION=$(grep 'nebari_version: ' ${{ steps.init.outputs.config }} | sed 's/nebari_version: //')
echo "OLD_NEBARI_VERSION=${OLD_NEBARI_VERSION}" | tee --append "${GITHUB_ENV}"
- name: Deploy Nebari
working-directory: ${{ steps.init.outputs.directory }}
run: nebari deploy --config ${{ steps.init.outputs.config }} --disable-prompt
- name: Health check before upgrade
id: health-check-before
uses: ./.github/actions/health-check
with:
domain: ${{ steps.init.outputs.domain }}
- name: Install current Nebari
run: pip install --upgrade .
- name: Upgrade Nebari config
run: |
git add --force ${{ steps.init.outputs.config }}
nebari upgrade --config ${{ steps.init.outputs.config }} --attempt-fixes
git diff
nebari validate --config ${{ steps.init.outputs.config }}
- name: Redeploy Nebari
working-directory: ${{ steps.init.outputs.directory }}
run: nebari deploy --config ${{ steps.init.outputs.config }} --disable-prompt
- name: Health check after upgrade
id: health-check-after
uses: ./.github/actions/health-check
with:
domain: ${{ steps.init.outputs.domain }}