diff --git a/.circleci/config.yml b/.circleci/config.yml index 97692a6ef..ffa5c22d6 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -296,7 +296,11 @@ jobs: path: ~/wheels check_release: docker: - - image: cimg/python:3.10 + - image: girder/tox-and-node + parameters: + node: + type: string + default: v20 steps: - checkout - run: @@ -307,6 +311,27 @@ jobs: - run: name: Install python packages command: pip install setuptools_scm twine + - run: + name: Use nvm + # see https://discuss.circleci.com/t/nvm-does-not-change-node-version-on-machine/28973/14 + command: | + echo 'export NVM_DIR="/opt/circleci/.nvm"' >> $BASH_ENV + echo '[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"' >> $BASH_ENV + - restore_cache: + name: Restore nvm cache + key: v1-nvm-cache-<< parameters.node >> + - run: + name: Switch node versions + command: | + nvm install << parameters.node >> + nvm alias default << parameters.node >> + NODE_DIR=$(dirname $(which node)) + echo "export PATH=$NODE_DIR:\$PATH" >> $BASH_ENV + - run: + name: Check node versions + command: | + node --version + npm --version - run: name: Check release to PyPi command: ./.circleci/release_pypi.sh check diff --git a/.circleci/release_pypi.sh b/.circleci/release_pypi.sh index 3e77ccac1..65fcd7d20 100755 --- a/.circleci/release_pypi.sh +++ b/.circleci/release_pypi.sh @@ -13,12 +13,22 @@ twine ${1:-check} $( [[ "${1:-check}" == "upload" ]] && printf %s '--verbose' ) cd "$ROOTPATH/girder" cp "$ROOTPATH/README.rst" . cp "$ROOTPATH/LICENSE" . +# Build the client plugin code +pushd "$ROOTPATH/girder/girder_large_image/web_client/" +npm ci +npm run build +popd python setup.py sdist pip wheel . --no-deps -w dist twine ${1:-check} $( [[ "${1:-check}" == "upload" ]] && printf %s '--verbose' ) dist/* cd "$ROOTPATH/girder_annotation" cp "$ROOTPATH/README.rst" . cp "$ROOTPATH/LICENSE" . +# Build the client plugin code +pushd "$ROOTPATH/girder_annotation/girder_large_image_annotation/web_client/" +npm ci +npm run build +popd python setup.py sdist pip wheel . --no-deps -w dist twine ${1:-check} $( [[ "${1:-check}" == "upload" ]] && printf %s '--verbose' ) dist/* @@ -49,6 +59,7 @@ twine ${1:-check} $( [[ "${1:-check}" == "upload" ]] && printf %s '--verbose' ) cd "$ROOTPATH/sources/dicom" cp "$ROOTPATH/README.rst" . cp "$ROOTPATH/LICENSE" . +# TODO build DICOMweb plugin client code when converted python setup.py sdist pip wheel . --no-deps -w dist twine ${1:-check} $( [[ "${1:-check}" == "upload" ]] && printf %s '--verbose' ) dist/*