-
Notifications
You must be signed in to change notification settings - Fork 94
126 lines (110 loc) · 3.56 KB
/
test_conda_store_integration.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
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
name: "Conda Store Integration Tests"
env:
TEST_USERNAME: "test-user"
TEST_PASSWORD: "P@sswo3d"
NEBARI_IMAGE_TAG: "main"
on:
pull_request:
paths:
- ".github/workflows/test_conda_store_integration.yaml"
- "tests/**"
- "scripts/**"
- "src/**"
- "pyproject.toml"
- "pytest.ini"
- ".cirun.yml"
push:
branches:
- main
- release/\d{4}.\d{1,2}.\d{1,2}
paths:
- ".github/workflows/test_conda_store_integration.yaml"
- "tests/**"
- "scripts/**"
- "src/**"
- "pyproject.toml"
- "pytest.ini"
- ".cirun.yml"
workflow_call:
inputs:
pr_number:
required: true
type: string
workflow_dispatch:
# When the cancel-in-progress: true option is specified, any concurrent jobs or workflows using the same
# concurrency group will cancel both the pending and currently running jobs or workflows. This allows only
# one job or workflow in the concurrency group to be in progress at a time.
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
test-conda-store-integration:
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: Setup runner for local deployment
uses: ./.github/actions/setup-local
- name: Checkout the branch from the PR that triggered the job
if: ${{ github.event_name == 'issue_comment' }}
run: |
hub version
hub pr checkout ${{ inputs.pr_number }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- 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 JQ
run: |
sudo apt-get update
sudo apt-get install jq -y
- name: Install Nebari
run: |
pip install .[dev]
- name: Initialize Nebari config for local deployment
id: init
uses: ./.github/actions/init-local
- name: Deploy Nebari
working-directory: ${{ steps.init.outputs.directory }}
run: nebari deploy --config ${{ steps.init.outputs.config }} --disable-prompt
- name: Health check
uses: ./.github/actions/health-check
with:
domain: ${{ steps.init.outputs.domain }}
- name: Create example-user
working-directory: ${{ steps.init.outputs.directory }}
run: |
nebari keycloak adduser --user "${TEST_USERNAME}" "${TEST_PASSWORD}" --config ${{ steps.init.outputs.config }}
nebari keycloak listusers --config ${{ steps.init.outputs.config }}
- name: Await Workloads
uses: jupyterhub/action-k8s-await-workloads@v3
with:
workloads: "" # all
namespace: "dev"
timeout: 300
max-restarts: 3
- name: "Checkout conda-store"
uses: actions/checkout@main
with:
fetch-depth: 0
repository: conda-incubator/conda-store
path: conda-store
- name: Deployment Pytests
env:
NEBARI_CONFIG_PATH: ${{ steps.init.outputs.config }}
KEYCLOAK_USERNAME: ${{ env.TEST_USERNAME }}
KEYCLOAK_PASSWORD: ${{ env.TEST_PASSWORD }}
run: |
cd conda-store
python -m pytest -m "user_journey"