-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into enh/46-interfaces-api
- Loading branch information
Showing
2 changed files
with
114 additions
and
35 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 |
---|---|---|
@@ -1,26 +1,95 @@ | ||
# Use the latest 2.1 version of CircleCI pipeline process engine. | ||
# See: https://circleci.com/docs/2.0/configuration-reference | ||
version: 2.1 | ||
orbs: | ||
docker: circleci/[email protected] | ||
|
||
# Define a job to be invoked later in a workflow. | ||
# See: https://circleci.com/docs/2.0/configuration-reference/#jobs | ||
jobs: | ||
say-hello: | ||
# Specify the execution environment. You can specify an image from Dockerhub or use one of our Convenience Images from CircleCI's Developer Hub. | ||
# See: https://circleci.com/docs/2.0/configuration-reference/#docker-machine-macos-windows-executor | ||
docker: | ||
- image: cimg/base:stable | ||
# Add steps to the job | ||
# See: https://circleci.com/docs/2.0/configuration-reference/#steps | ||
test_pytest: | ||
docker: # executor type | ||
- image: nipreps/miniconda:py39_2209.01 | ||
auth: | ||
username: $DOCKER_USER | ||
password: $DOCKER_PAT | ||
|
||
environment: | ||
- TEST_DIR: /tmp/tests | ||
steps: | ||
- checkout | ||
- run: | ||
name: "Say hello" | ||
command: "echo Hello, World!" | ||
name: Get codecov | ||
command: python -m pip install codecov | ||
|
||
- run: | ||
name: Run unit tests | ||
no_output_timeout: 2h | ||
command: | | ||
export TEST_OUTPUT_DIR=${TEST_DIR}/output | ||
mkdir -p ${TEST_OUTPUT_DIR} ${TEST_DIR}/summary ${TEST_DIR}/coverage | ||
python -m pytest --junit-xml=${TEST_DIR}/summary/pytest.xml \ | ||
--cov nireports --cov-report xml:${TEST_DIR}/coverage/unittests.xml \ | ||
nireports/ | ||
- store_artifacts: | ||
path: /tmp/tests/output | ||
|
||
- store_test_results: | ||
path: /tmp/tests/summary/ | ||
|
||
- run: | ||
name: Submit unit test coverage | ||
command: | | ||
python -m codecov --file ${TEST_DIR}/coverage/unittests.xml \ | ||
--flags unittests -e CIRCLE_JOB | ||
build_docs: | ||
docker: # executor type | ||
- image: nipreps/miniconda:py39_2209.01 | ||
auth: | ||
username: $DOCKER_USER | ||
password: $DOCKER_PAT | ||
|
||
environment: | ||
- FSLOUTPUTTYPE: NIFTI | ||
- SUBJECTS_DIR: /tmp/subjects | ||
steps: | ||
- checkout | ||
- run: | ||
name: Create subjects folder | ||
command: mkdir -p $SUBJECTS_DIR | ||
- run: | ||
name: Install deps | ||
command: | | ||
python -m pip install --no-cache-dir -U "pip>=20.3" | ||
- run: | ||
name: Install Nireports | ||
command: | | ||
python -m pip install .[docs] | ||
- run: | ||
name: Build only this commit | ||
command: | | ||
BRANCH=$( echo $CIRCLE_BRANCH | sed 's+/+_+g' ) | ||
make -C docs SPHINXOPTS="-W" BUILDDIR="/tmp/docs" OUTDIR=${CIRCLE_TAG:-$BRANCH} html | ||
- store_artifacts: | ||
path: /tmp/docs | ||
|
||
# Invoke jobs via workflows | ||
# See: https://circleci.com/docs/2.0/configuration-reference/#workflows | ||
workflows: | ||
say-hello-workflow: | ||
version: 2 | ||
build_test_deploy: | ||
jobs: | ||
- say-hello | ||
- test_pytest: | ||
context: | ||
- nipreps-common | ||
filters: | ||
tags: | ||
only: /.*/ | ||
branches: | ||
ignore: | ||
- /docs?\/.*/ | ||
|
||
- build_docs: | ||
filters: | ||
branches: | ||
ignore: | ||
- /tests?\/.*/ | ||
tags: | ||
only: /.*/ |
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