5353 with :
5454 fetch-depth : 0
5555
56+ - name : Setup runner for local deployment
57+ uses : ./.github/actions/setup-local
58+
5659 - name : Checkout the branch from the PR that triggered the job
5760 if : ${{ github.event_name == 'issue_comment' }}
5861 run : |
@@ -75,82 +78,29 @@ jobs:
7578 pip install .[dev]
7679 playwright install
7780
78- 79- with :
80- version : v1.19.16
81-
82- - name : Enable docker permissions for user
83- run : |
84- sudo docker ps
85- sudo usermod -aG docker $USER && newgrp docker
86-
87- docker info
88- docker ps
89-
90- - name : Get routing table for docker pods
91- run : |
92- ip route
93-
94- - name : Initialize Nebari Cloud
95- run : |
96- mkdir -p local-deployment
97- cd local-deployment
98- nebari init local --project=thisisatest --domain github-actions.nebari.dev --auth-provider=password
99-
100- # Need smaller profiles on Local Kind
101- sed -i -E 's/(cpu_guarantee):\s+[0-9\.]+/\1: 0.25/g' "nebari-config.yaml"
102- sed -i -E 's/(mem_guarantee):\s+[A-Za-z0-9\.]+/\1: 0.25G/g' "nebari-config.yaml"
103-
104- # Change default JupyterLab theme
105- cat >> nebari-config.yaml <<- EOM
106- jupyterlab:
107- default_settings:
108- "@jupyterlab/apputils-extension:themes":
109- theme: JupyterLab Dark
110- EOM
111-
112- # Change default value for minio persistence size
113- cat >> nebari-config.yaml <<- EOM
114- monitoring:
115- enabled: true
116- overrides:
117- minio:
118- persistence:
119- size: 1Gi
120- EOM
121-
122- cat nebari-config.yaml
81+ - name : Initialize Nebari config for local deployment
82+ id : init
83+ uses : ./.github/actions/init-local
12384
12485 - name : Deploy Nebari
125- working-directory : local-deployment
126- run : |
127- nebari deploy --config nebari-config.yaml --disable-prompt
86+ working-directory : ${{ steps.init.outputs.directory }}
87+ run : nebari deploy --config ${{ steps.init.outputs.config }} --disable-prompt
12888
129- - name : Basic kubectl checks after deployment
130- if : always()
131- run : |
132- kubectl get all,cm,secret,pv,pvc,ing -A
133-
134- - name : Check github-actions.nebari.dev resolves
135- run : |
136- nslookup github-actions.nebari.dev
137-
138- - name : Curl jupyterhub login page
139- run : |
140- curl -k https://github-actions.nebari.dev/hub/home -i
89+ - name : Health check
90+ uses : ./.github/actions/health-check
91+ with :
92+ domain : ${{ steps.init.outputs.domain }}
14193
14294 - name : Create example-user
143- working-directory : local-deployment
95+ working-directory : ${{ steps.init.outputs.directory }}
14496 run : |
145- nebari keycloak adduser --user "${TEST_USERNAME}" "${TEST_PASSWORD}" --config nebari-config.yaml
146- nebari keycloak listusers --config nebari-config.yaml
147-
148- - name : Get nebari-config.yaml full path
149- run : echo "NEBARI_CONFIG_PATH=`realpath ./local-deployment/nebari-config.yaml`" >> "$GITHUB_ENV"
97+ nebari keycloak adduser --user "${TEST_USERNAME}" "${TEST_PASSWORD}" --config ${{ steps.init.outputs.config }}
98+ nebari keycloak listusers --config ${{ steps.init.outputs.config }}
15099
151100 # ## DEPLOYMENT TESTS
152101 - name : Deployment Pytests
153102 env :
103+ NEBARI_CONFIG_PATH : ${{ steps.init.outputs.config }}
154104 KEYCLOAK_USERNAME : ${{ env.TEST_USERNAME }}
155105 KEYCLOAK_PASSWORD : ${{ env.TEST_PASSWORD }}
156106 run : |
@@ -165,7 +115,7 @@ jobs:
165115 env :
166116 KEYCLOAK_USERNAME : ${{ env.TEST_USERNAME }}
167117 KEYCLOAK_PASSWORD : ${{ env.TEST_PASSWORD }}
168- NEBARI_FULL_URL : https://github-actions.nebari.dev/
118+ NEBARI_FULL_URL : " https://${{ steps.init.outputs.domain }}/ "
169119 working-directory : tests/tests_e2e/playwright
170120 run : |
171121 # create environment file
@@ -187,6 +137,5 @@ jobs:
187137 # in the CI, it makes sense to only run on merge to main or workflow_dispatch to speed
188138 # up feedback cycle
189139 if : github.ref_name == 'main' || github.event_name == 'workflow_dispatch'
190- working-directory : local-deployment
191- run : |
192- nebari destroy --config nebari-config.yaml --disable-prompt
140+ working-directory : ${{ steps.init.outputs.directory }}
141+ run : nebari destroy --config ${{ steps.init.outputs.config }} --disable-prompt
0 commit comments