-
Notifications
You must be signed in to change notification settings - Fork 2
141 lines (130 loc) · 4.53 KB
/
make.yml
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
name: make
on:
release:
types: [published]
push:
branches:
- '**'
tags-ignore:
- '**'
schedule:
- cron: '0 4 5,25 * *'
jobs:
configure-workflow:
name: Configure workflow
runs-on: ubuntu-latest
outputs:
should_skip: ${{ steps.skip_check.outputs.should_skip }}
runner: ${{ steps.choose-runner.outputs.runner }}
steps:
- id: skip_check
name: Configure skip-duplicate-actions
uses: fkirc/skip-duplicate-actions@v5
with:
paths_ignore: '["**/README.md"]' # FIXME
do_not_skip: '["workflow_dispatch", "schedule", "release"]'
- id: choose-runner
uses: QCDIS/choose-action-runner@v2
with:
preferred-runner: naavre
fallback-runner: ubuntu-latest
github-token: ${{ secrets.RUNNER_ACCESS_TOKEN }}
check_secrets_and_variables:
uses: ./.github/workflows/check_secrets_and_variables.yml
needs: [configure-workflow]
with:
runs-on: ubuntu-latest
jupyterhub_user: ${{ vars.JUPYTERHUB_USER }}
vlab_slug: ${{ vars.VLAB_SLUG }}
cell_github: ${{ vars.CELL_GITHUB }}
api_endpoint: ${{ vars.API_ENDPOINT }}
module_mapping_url: ${{ vars.MODULE_MAPPING_URL }}
search_api_endpoint: ${{ vars.SEARCH_API_ENDPOINT }}
registry_url: ${{ vars.REGISTRY_URL }}
argo_url: ${{ vars.ARGO_URL }}
debug: ${{ vars.DEBUG }}
secrets:
argo_api_token: ${{ secrets.ARGO_API_TOKEN }}
cell_github_token: ${{ secrets.CELL_GITHUB_TOKEN }}
naavre_api_token: ${{ secrets.NAAVRE_API_TOKEN }}
search_api_token: ${{ secrets.SEARCH_API_TOKEN }}
lint:
uses: ./.github/workflows/lint.yml
needs: [configure-workflow]
if: ${{ needs.configure-workflow.outputs.should_skip != 'true' }}
with:
runs-on: ubuntu-latest
call-collect-tests:
uses: ./.github/workflows/collect-tests.yml
split-tests:
needs: [call-collect-tests]
runs-on: ubuntu-latest
outputs:
test_list: ${{ steps.split-output.outputs.test_list }}
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Download pytest output artifact
uses: actions/download-artifact@v3
with:
name: test_list
path: ./
- name: Generate matrix from pytest_output
id: split-output
run: |
cat test_list.json
MATRIX=$(jq -c . test_list.json)
echo $MATRIX
echo "test_list=$MATRIX" >> $GITHUB_OUTPUT
call-pytest:
uses: ./.github/workflows/run-tests.yml
needs: [configure-workflow,split-tests]
if: ${{ needs.configure-workflow.outputs.should_skip != 'true' }}
strategy:
fail-fast: false
matrix:
test: ${{ fromJson(needs.split-tests.outputs.test_list) }}
with:
runs-on: ${{ needs.configure-workflow.outputs.runner }}
jupyterhub_user: ${{ vars.JUPYTERHUB_USER }}
vlab_slug: ${{ vars.VLAB_SLUG }}
cell_github: ${{ vars.CELL_GITHUB }}
api_endpoint: ${{ vars.API_ENDPOINT }}
module_mapping_url: ${{ vars.MODULE_MAPPING_URL }}
search_api_endpoint: ${{ vars.SEARCH_API_ENDPOINT }}
registry_url: ${{ vars.REGISTRY_URL }}
debug: ${{ vars.DEBUG }}
test: ${{ matrix.test }}
secrets:
cell_github_token: ${{ secrets.CELL_GITHUB_TOKEN }}
naavre_api_token: ${{ secrets.NAAVRE_API_TOKEN }}
search_api_token: ${{ secrets.SEARCH_API_TOKEN }}
make-release:
uses: ./.github/workflows/make-release.yml
needs: [configure-workflow]
if: ${{ needs.configure-workflow.outputs.should_skip != 'true' }}
with:
runs-on: ubuntu-latest
jupyterhub_user: ${{ vars.JUPYTERHUB_USER }}
vlab_slug: ${{ vars.VLAB_SLUG }}
cell_github: ${{ vars.CELL_GITHUB }}
api_endpoint: ${{ vars.API_ENDPOINT }}
module_mapping_url: ${{ vars.MODULE_MAPPING_URL }}
search_api_endpoint: ${{ vars.SEARCH_API_ENDPOINT }}
registry_url: ${{ vars.REGISTRY_URL }}
debug: ${{ vars.DEBUG }}
secrets:
cell_github_token: ${{ secrets.CELL_GITHUB_TOKEN }}
naavre_api_token: ${{ secrets.NAAVRE_API_TOKEN }}
search_api_token: ${{ secrets.SEARCH_API_TOKEN }}
call-build-container-vanilla:
needs: [make-release,call-pytest]
uses: ./.github/workflows/build-container.yml
with:
wheel_artifact_name: jupyterlab_vre
docker_folder: vanilla
tag: n-a-a-vre
push: ${{ github.event_name == 'release' }}
secrets:
docker_username: ${{ secrets.DOCKERHUB_USERNAME }}
docker_password: ${{ secrets.DOCKERHUB_PASSWORD }}