File tree Expand file tree Collapse file tree 3 files changed +48
-7
lines changed
Expand file tree Collapse file tree 3 files changed +48
-7
lines changed Original file line number Diff line number Diff line change 1+ name : Publish Package
2+
3+ on :
4+ release :
5+ types : [published]
6+
7+
8+ jobs :
9+ deploy :
10+ runs-on : ubuntu-latest
11+ steps :
12+ - uses : actions/checkout@v2
13+ - name : Install node
14+ uses : actions/setup-node@v1
15+ with :
16+ node-version : ' 12.x'
17+ registry-url : ' https://registry.npmjs.org'
18+ - name : Install Python
19+ uses : actions/setup-python@v1
20+ with :
21+ python-version : ' 3.x'
22+ - name : Install dependencies
23+ run : |
24+ python -m pip install --upgrade pip
25+ pip install jupyterlab packaging setuptools twine wheel
26+ - name : Test version are matching
27+ run : python -c "from release import assertEqualVersion; assertEqualVersion()"
28+ - name : Publish the Python package
29+ env :
30+ TWINE_USERNAME : __token__
31+ TWINE_PASSWORD : ${{ secrets.PYPI_API_TOKEN }}
32+ run : |
33+ python setup.py sdist bdist_wheel
34+ twine upload dist/*
35+ - name : Publish the NPM package
36+ run : |
37+ npm publish --access public
38+ env :
39+ NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
Original file line number Diff line number Diff line change 1- ## CI/CD:
2- - CD: Trigger releases on tags.
3- - ** What?** Add CD capabilities to trigger a release when a tag is pushed.
4- - ** Why?** Save maintainer manual effort on releases. Increase cadence of releases.
5- - Combining the Python and JS files into one installable package
6- - ** What?** Provide a single installation for both the frontend and the server package
7- - ** Why?** Reduce number of issues from users have different versions of the NPM and Python packages. Easier installation for users
1+ ## CI/CD:
82 - Integration Testing
93 - ** What?** Test suite that actually exercises UI and API against an actual Git repo without mocking out Git calls.
104 - ** Why?** Enables us to better test against an actual Git process. Stepping stone to x-OS testing such as Windows.
Original file line number Diff line number Diff line change 22import argparse as argpar
33import json
44import subprocess
5+ from packaging .version import parse
56
67from setupbase import get_version
78
89VERSION_PY = 'jupyterlab_git/_version.py'
910
11+ def assertEqualVersion ():
12+ serverVersion = parse (serverExtensionVersion ())
13+ frontendVersion = parse (labExtensionVersion ())
14+
15+ error_msg = "Frontend ({}) and server ({}) version do not match" .format (frontendVersion , serverVersion )
16+ assert serverVersion == frontendVersion , error_msg
17+
1018def prepLabextensionBundle ():
1119 subprocess .run (['jlpm' , 'clean:slate' ])
1220
You can’t perform that action at this time.
0 commit comments