@@ -2,70 +2,69 @@ name: CI
22
33on : [push, pull_request]
44# on:
5- # push:
6- # branches: 'master'
7- # schedule:
8- # - cron: '0 0 * * *'
5+ # push:
6+ # branches: 'master'
7+ # schedule:
8+ # - cron: '0 0 * * *'
99
1010jobs :
1111 build :
12-
1312 runs-on : ubuntu-20.04
1413
1514 steps :
16- - uses : actions/checkout@v2
17- - uses : actions/setup-node@v2
18- with :
19- node-version : ' 14.x'
20- - name : Install Python
21- uses : actions/setup-python@v2
22- with :
23- python-version : ' 3.9'
24-
25- - name : Setup pip cache
26- uses : actions/cache@v2
27- with :
28- path : ~/.cache/pip
29- key : pip-3.9-${{ hashFiles('package.json') }}
30- restore-keys : |
31- pip-3.9-
32- pip-
33- - name : Get yarn cache directory path
34- id : yarn-cache-dir-path
35- run : echo "::set-output name=dir::$(yarn cache dir)"
36- - name : Setup yarn cache
37- uses : actions/cache@v2
38- id : yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
39- with :
40- path : ${{ steps.yarn-cache-dir-path.outputs.dir }}
41- key : yarn-${{ hashFiles('**/yarn.lock') }}
42- restore-keys : |
43- yarn-
44-
45- - name : Install dependencies
46- run : |
47- python -m pip install --upgrade pip
48- pip install wheel twine setuptools packaging jupyterlab~=3.0 jupyter_packaging~=0.7.9
49- jlpm
50-
51- - name : Create server extension # and pip install
52- run : |
53- jlpm run build:prod
54-
55- - name : Package extension
56- run : |
57- python setup.py sdist bdist_wheel
58- - name : upload python build artifacts
59- uses : actions/upload-artifact@v2
60- with :
61- name : dist
62- path : dist
63-
64- - name : upload typescript build artifacts
65- uses : actions/upload-artifact@v2
66- with :
67- name : lib
68- path : lib
15+ - uses : actions/checkout@v2
16+ - uses : actions/setup-node@v2
17+ with :
18+ node-version : " 14.x"
19+ - name : Install Python
20+ uses : actions/setup-python@v2
21+ with :
22+ python-version : " 3.9"
23+
24+ - name : Setup pip cache
25+ uses : actions/cache@v2
26+ with :
27+ path : ~/.cache/pip
28+ key : pip-3.9-${{ hashFiles('package.json') }}
29+ restore-keys : |
30+ pip-3.9-
31+ pip-
32+ - name : Get yarn cache directory path
33+ id : yarn-cache-dir-path
34+ run : echo "::set-output name=dir::$(yarn cache dir)"
35+ - name : Setup yarn cache
36+ uses : actions/cache@v2
37+ id : yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
38+ with :
39+ path : ${{ steps.yarn-cache-dir-path.outputs.dir }}
40+ key : yarn-${{ hashFiles('**/yarn.lock') }}
41+ restore-keys : |
42+ yarn-
43+
44+ - name : Install dependencies
45+ run : |
46+ python -m pip install --upgrade pip
47+ pip install wheel twine setuptools packaging jupyterlab~=3.0 jupyter_packaging~=0.7.9
48+ jlpm
49+
50+ - name : Create server extension # and pip install
51+ run : |
52+ jlpm run build:prod
53+
54+ - name : Package extension
55+ run : |
56+ python setup.py sdist bdist_wheel
57+ - name : upload python build artifacts
58+ uses : actions/upload-artifact@v2
59+ with :
60+ name : dist
61+ path : dist
62+
63+ - name : upload typescript build artifacts
64+ uses : actions/upload-artifact@v2
65+ with :
66+ name : lib
67+ path : lib
6968
7069 test :
7170 needs : build
@@ -86,73 +85,72 @@ jobs:
8685 - /minio-data:/data
8786 options : --health-cmd "curl --fail http://localhost:9000/minio/health/live" --health-interval 30s --health-timeout 5s --health-retries 3
8887 steps :
89- - uses : actions/checkout@v2
90- - name : download build artifacts
91- uses : actions/download-artifact@v2
92- - uses : actions/setup-python@v2
93- with :
94- python-version : ' 3.9'
95-
96- - name : Install JupyterLab
97- run : pip install ${{ matrix.jupyterlab_version }}
98-
99-
100- - name : Install extension
101- run : pip install dist/*.whl && jupyter serverextension enable --py jupyterlab_s3_browser
102-
103- - name : Install extension (JupyterLab 2 only)
104- run : jupyter labextension install .
105- if : ${{ matrix.jupyterlab_version == 'jupyterlab==2.*' }}
106-
107- - name : allow cypress to access minio-data mount
108- run : sudo chown -R 1001:1001 /minio-data
109-
110- - uses : cypress-io/github-action@v2
111- with :
112- start : jupyter lab --no-browser --ServerApp.password='' --ServerApp.token='' --NotebookApp.token='' --NotebookApp.password=''
113- browser : chrome
114- headless : true
115- wait-on : " http://localhost:8888/lab"
116- wait-on-timeout : 120
117- env :
118- JUPYTERLAB_S3_ENDPOINT : http://localhost:9000
119- JUPYTERLAB_S3_ACCESS_KEY_ID : ACCESS_KEY
120- JUPYTERLAB_S3_SECRET_ACCESS_KEY : SECRET_KEY
121- CYPRESS_S3_FOLDER : /minio-data
122- CYPRESS_CI : true
123-
124- - uses : actions/upload-artifact@v1
125- if : failure()
126- with :
127- name : cypress-screenshots
128- path : cypress/screenshots
129-
130- - uses : actions/upload-artifact@v1
131- if : always()
132- with :
133- name : cypress-videos
134- path : cypress/videos
88+ - uses : actions/checkout@v2
89+ - name : download build artifacts
90+ uses : actions/download-artifact@v2
91+ - uses : actions/setup-python@v2
92+ with :
93+ python-version : " 3.9"
94+
95+ - name : Install JupyterLab
96+ run : pip install ${{ matrix.jupyterlab_version }}
97+
98+ - name : Install extension
99+ run : pip install dist/*.whl && jupyter serverextension enable --py jupyterlab_s3_browser
100+
101+ - name : Install extension (JupyterLab 2 only)
102+ run : jupyter labextension install .
103+ if : ${{ matrix.jupyterlab_version == 'jupyterlab==2.*' }}
104+
105+ - name : allow cypress to access minio-data mount
106+ run : sudo chown -R 1001:1001 /minio-data
107+
108+ - uses : cypress-io/github-action@v2
109+ with :
110+ start : jupyter lab --no-browser --ServerApp.password='' --ServerApp.token='' --NotebookApp.token='' --NotebookApp.password=''
111+ browser : chrome
112+ headless : true
113+ wait-on : " http://localhost:8888/lab"
114+ wait-on-timeout : 120
115+ env :
116+ JUPYTERLAB_S3_ENDPOINT : http://localhost:9000
117+ JUPYTERLAB_S3_ACCESS_KEY_ID : ACCESS_KEY
118+ JUPYTERLAB_S3_SECRET_ACCESS_KEY : SECRET_KEY
119+ CYPRESS_S3_FOLDER : /minio-data
120+ CYPRESS_CI : true
121+
122+ - uses : actions/upload-artifact@v1
123+ if : failure()
124+ with :
125+ name : cypress-screenshots
126+ path : cypress/screenshots
127+
128+ - uses : actions/upload-artifact@v1
129+ if : always()
130+ with :
131+ name : cypress-videos
132+ path : cypress/videos
135133
136134 publish :
137135 if : github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
138136 needs : [build, test]
139137 runs-on : ubuntu-20.04
140138 steps :
141- - uses : actions/checkout@v2
142- - uses : actions/setup-node@v2
143- with :
144- node-version : ' 14.x'
145- - name : Download build artifacts
146- uses : actions/download-artifact@v2
147- - run : yarn
148- - name : Publish a Python distribution to PyPI
149- uses : pypa/gh-action-pypi-publish@master
150- with :
151- user : __token__
152- password : ${{ secrets.PYPI_API_TOKEN }}
153-
154- - name : Publish labextension NPM
155- uses : JS-DevTools/npm-publish@v1
156- with :
157- token : ${{ secrets.NPM_TOKEN }}
158- skip_existing : true
139+ - uses : actions/checkout@v2
140+ - uses : actions/setup-node@v2
141+ with :
142+ node-version : " 14.x"
143+ - name : Download build artifacts
144+ uses : actions/download-artifact@v2
145+ - run : yarn
146+ - name : Publish a Python distribution to PyPI
147+ uses : pypa/gh-action-pypi-publish@master
148+ with :
149+ user : __token__
150+ password : ${{ secrets.PYPI_API_TOKEN }}
151+
152+ - name : Publish labextension NPM
153+ uses : JS-DevTools/npm-publish@v1
154+ with :
155+ token : ${{ secrets.NPM_TOKEN }}
156+ skip_existing : true
0 commit comments