-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
ci-build
committed
Oct 31, 2023
0 parents
commit 18b04bb
Showing
330 changed files
with
77,887 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# Sphinx build info version 1 | ||
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. | ||
config: bccc7db30c4fcef41cc846686d2028b5 | ||
tags: 645f666f9bcd5a90fca523b33c5a78b7 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,366 @@ | ||
version: 2.1 | ||
executors: | ||
toxandnode: | ||
working_directory: ~/project | ||
docker: | ||
- image: girder/tox-and-node | ||
commands: | ||
tox: | ||
description: "Run tox" | ||
parameters: | ||
env: | ||
type: string | ||
steps: | ||
- run: | ||
name: Upgrade pip | ||
command: pip install -U pip | ||
- run: | ||
name: Upgrade virtualenv and tox | ||
command: pip install -U virtualenv tox | ||
# - run: | ||
# name: Preinstall phantomjs to work around an npm permission issue | ||
# command: npm install -g phantomjs-prebuilt --unsafe-perm | ||
- run: | ||
name: Run tests via tox | ||
# Piping through cat does less buffering of the output but can | ||
# consume the exit code | ||
# command: PYTEST_ADDOPTS=--forked tox -e << parameters.env >> | cat; test ${PIPESTATUS[0]} -eq 0 | ||
command: PYTEST_ADDOPTS=--reruns=3 tox -e << parameters.env >> | cat; test ${PIPESTATUS[0]} -eq 0 | ||
switchpython: | ||
description: "Upgrade python" | ||
parameters: | ||
version: | ||
type: string | ||
steps: | ||
- run: | ||
name: Upgrade pyenv | ||
command: | | ||
rm -rf /opt/circleci/.pyenv | ||
curl -L https://github.com/pyenv/pyenv-installer/raw/master/bin/pyenv-installer | bash | ||
pyenv install --list list | ||
- run: | ||
name: Use pyenv to install python | ||
command: | | ||
pyenv install << parameters.version >> | ||
- run: | ||
name: Use pyenv to set python version | ||
command: | | ||
pyenv versions | ||
pyenv global << parameters.version >> | ||
allservices: | ||
description: "Switch to a python version and start other services" | ||
parameters: | ||
version: | ||
type: string | ||
node: | ||
type: string | ||
steps: | ||
- switchpython: | ||
version: << parameters.version >> | ||
- run: | ||
name: start mongo | ||
# This had been | ||
# docker run --rm -d -p 27017:27017 circleci/mongo:5.0-ram | ||
# but circleci has deprecated their mongo images. Running as ram | ||
# just turned off journalling and run with the db on a memory mapped | ||
# location. --bind_ip_all is required. | ||
command: | | ||
docker run --rm -d -p 127.0.0.1:27017:27017 mongo:5.0 bash -c "mkdir /dev/shm/mongo && mongod --nojournal --dbpath=/dev/shm/mongo --noauth --bind_ip_all" | ||
- run: | ||
name: start rabbitmq | ||
command: | | ||
docker run --rm -d -p 5672:5672 rabbitmq | ||
- run: | ||
name: start memcached | ||
command: | | ||
docker run --rm -d -p 11211:11211 memcached -m 64 | ||
- 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 | ||
- 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 | ||
coverage: | ||
description: "Upload coverage" | ||
steps: | ||
- run: | ||
name: Install Codecov client | ||
command: | | ||
curl -Os https://uploader.codecov.io/latest/linux/codecov | ||
chmod +x codecov | ||
- run: | ||
name: Upload coverage | ||
command: | | ||
./codecov --disable search pycov gcov --file build/test/coverage/py_coverage.xml,build/test/coverage/cobertura-coverage.xml | ||
jobs: | ||
testdocker: | ||
machine: | ||
image: ubuntu-2004:202111-02 | ||
steps: | ||
- checkout | ||
- run: | ||
name: Build the test docker | ||
command: docker build --force-rm -t girder/tox-and-node -f test.Dockerfile . | ||
- run: | ||
name: Publish the images to Docker Hub | ||
command: | | ||
echo "$DOCKERHUB_PASS" | docker login -u "$DOCKERHUB_USERNAME" --password-stdin | ||
docker push girder/tox-and-node:latest | ||
py38: | ||
machine: | ||
image: ubuntu-2004:202111-02 | ||
steps: | ||
- checkout | ||
- allservices: | ||
version: "3.8" | ||
node: v14 | ||
- tox: | ||
env: test-py38 | ||
- coverage | ||
- store_artifacts: | ||
path: build/test/artifacts | ||
py39: | ||
machine: | ||
image: ubuntu-2004:202111-02 | ||
steps: | ||
- checkout | ||
- allservices: | ||
version: "3.9" | ||
node: v14 | ||
- tox: | ||
env: test-py39 | ||
- coverage | ||
- store_artifacts: | ||
path: build/test/artifacts | ||
py310: | ||
machine: | ||
image: ubuntu-2004:202111-02 | ||
steps: | ||
- checkout | ||
- allservices: | ||
version: "3.10" | ||
node: v14 | ||
- tox: | ||
env: test-py310 | ||
- coverage | ||
- store_artifacts: | ||
path: build/test/artifacts | ||
py311: | ||
machine: | ||
image: ubuntu-2004:202111-02 | ||
steps: | ||
- checkout | ||
- allservices: | ||
version: "3.11" | ||
node: v14 | ||
- tox: | ||
env: test-py311 | ||
- coverage | ||
- store_artifacts: | ||
path: build/test/artifacts | ||
py312: | ||
machine: | ||
image: ubuntu-2004:202111-02 | ||
steps: | ||
- checkout | ||
- allservices: | ||
version: "3.12" | ||
node: v14 | ||
- tox: | ||
env: test-py312 | ||
- coverage | ||
- store_artifacts: | ||
path: build/test/artifacts | ||
lint_and_docs: | ||
executor: toxandnode | ||
steps: | ||
- checkout | ||
- run: | ||
name: Install dependencies | ||
command: apt-get update -yq && apt-get install -yq pandoc && pandoc --version | ||
- tox: | ||
env: docs,lint,lintclient,notebook | ||
- store_artifacts: | ||
path: build/docs | ||
- persist_to_workspace: | ||
root: build | ||
paths: docs | ||
wheels: | ||
executor: toxandnode | ||
steps: | ||
- checkout | ||
- run: | ||
name: Build wheels | ||
command: ./.circleci/make_wheels.sh | ||
- run: | ||
name: Make index file | ||
command: python ./.circleci/make_index.py ~/wheels | ||
- store_artifacts: | ||
path: ~/wheels | ||
release: | ||
docker: | ||
- image: cimg/python:3.10 | ||
steps: | ||
- checkout | ||
- run: | ||
name: Setup virtual environment | ||
command: | | ||
if [ ! -d env ]; then python -m virtualenv env || python -m venv env; fi | ||
echo ". $CIRCLE_WORKING_DIRECTORY/env/bin/activate" >> $BASH_ENV | ||
- run: | ||
name: Install python packages | ||
command: pip install setuptools_scm twine | ||
- run: | ||
name: Release to PyPi | ||
command: ./.circleci/release_pypi.sh | ||
docs-deploy: | ||
working_directory: ~/project | ||
docker: | ||
- image: node | ||
steps: | ||
- checkout | ||
- attach_workspace: | ||
at: build | ||
- run: | ||
name: Disable jekyll builds | ||
command: touch build/docs/.nojekyll | ||
- run: | ||
name: Install and configure dependencies | ||
command: | | ||
npm install -g --silent 'gh-pages@<3.2.1||>3.2.1' | ||
git config user.email "[email protected]" | ||
git config user.name "ci-build" | ||
- add_ssh_keys: | ||
fingerprints: | ||
- "a4:7a:f8:e9:19:61:88:9b:d8:af:50:b8:32:9f:03:29" | ||
- run: | ||
name: Deploy docs to gh-pages branch | ||
command: | | ||
touch package.json | ||
gh-pages --dotfiles --message "Update documentation" --dist build/docs --no-history | ||
workflows: | ||
version: 2 | ||
ci: | ||
jobs: | ||
- testdocker: | ||
filters: | ||
branches: | ||
only: | ||
- master | ||
# Create a branch of this name to push to docker hub | ||
- testdocker | ||
- py38: | ||
filters: | ||
tags: | ||
only: /^v.*/ | ||
branches: | ||
ignore: | ||
- gh-pages | ||
- py39: | ||
filters: | ||
tags: | ||
only: /^v.*/ | ||
branches: | ||
ignore: | ||
- gh-pages | ||
- py310: | ||
filters: | ||
tags: | ||
only: /^v.*/ | ||
branches: | ||
ignore: | ||
- gh-pages | ||
- py311: | ||
filters: | ||
tags: | ||
only: /^v.*/ | ||
branches: | ||
ignore: | ||
- gh-pages | ||
- py312: | ||
filters: | ||
tags: | ||
only: /^v.*/ | ||
branches: | ||
ignore: | ||
- gh-pages | ||
- lint_and_docs: | ||
filters: | ||
tags: | ||
only: /^v.*/ | ||
branches: | ||
ignore: | ||
- gh-pages | ||
- wheels: | ||
requires: | ||
- py38 | ||
- py39 | ||
- py310 | ||
- py311 | ||
- py312 | ||
- lint_and_docs | ||
filters: | ||
tags: | ||
only: /^v.*/ | ||
branches: | ||
ignore: | ||
- gh-pages | ||
- release: | ||
requires: | ||
- py38 | ||
- py39 | ||
- py310 | ||
- py311 | ||
- py312 | ||
- lint_and_docs | ||
filters: | ||
tags: | ||
only: /^v.*/ | ||
branches: | ||
only: master | ||
- docs-deploy: | ||
requires: | ||
- py38 | ||
- py39 | ||
- py310 | ||
- py311 | ||
- py312 | ||
- lint_and_docs | ||
filters: | ||
tags: | ||
only: /^v.*/ | ||
branches: | ||
only: | ||
- master | ||
- sphinx | ||
periodic: | ||
triggers: | ||
- schedule: | ||
# Run every Monday morning at 3 a.m. | ||
cron: "0 3 * * 1" | ||
filters: | ||
branches: | ||
only: | ||
- master | ||
jobs: | ||
- py38 | ||
- py39 | ||
- py310 | ||
- py311 | ||
- py312 | ||
- lint_and_docs | ||
- wheels |
Oops, something went wrong.