-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WIP: Github actions #52
Conversation
Codecov Report
@@ Coverage Diff @@
## master #52 +/- ##
=======================================
Coverage 55.51% 55.51%
=======================================
Files 11 11
Lines 762 762
Branches 110 110
=======================================
Hits 423 423
Misses 338 338
Partials 1 1 Continue to review full report at Codecov.
|
I think that this is ready to go. This now (hopefully) does: test-suite, documentation build and docker image building. I will do the pypi deploy stuff on a separate PR. |
Please hold off on merging this for now. The recent 079a3b2 tries to use the canned action again. I might back off this in the end, but the developer of this action has made the additional effort of implementing this, so the least I can do is give it a whirl. |
.github/workflows/docbuild.yml
Outdated
pip install .[all] | ||
- name: Build docs | ||
run: | | ||
cd docs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please remove this line (and apply the next suggestion)
.github/workflows/docbuild.yml
Outdated
- name: Build docs | ||
run: | | ||
cd docs | ||
make html |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
make html | |
make -C docs html |
The rationale is that the makefile under docs/ inserts PWD in the pythonpath and you want it to be the root of the project :)
run: | | ||
cd docs | ||
make html | ||
- name: Upload docs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We'll need to think a bit further about this:
- If you just run
make -C doc
then the current version of the docs is built. - If you are to deploy, then the appropriate commandline is
make -f ./docs/Makefile versioned CURBRANCH=${CIRCLE_TAG:-$CIRCLE_BRANCH}
(replace $CIRCLE_TAG and $CIRCLE_BRANCH with appropriate values).
then, the versioned docs are deployed to gh-pages:
Lines 505 to 525 in b98c7e9
- run: | |
name: Generate Versioned Docs | |
command: | | |
set +e | |
force_versioned="$( git log --format=oneline -n 1 $CIRCLE_SHA1 | grep -i -E '\[docs?[ _]?versions?\]' )" | |
set -e | |
if [[ "x${CIRCLE_TAG}" = "x" && "${CIRCLE_BRANCH}" != "master" && "x${force_versioned}" = "x" ]]; then | |
echo "Not a tag or master branch - skipping versioned docs." | |
circleci step halt | |
else | |
make -f ./docs/Makefile versioned CURBRANCH=${CIRCLE_TAG:-$CIRCLE_BRANCH} | |
fi | |
- save_cache: | |
key: docs-v1-{{ .Branch }}-{{ .Revision }} | |
paths: | |
- ./docs/_build/_html | |
- persist_to_workspace: | |
root: docs/_build | |
paths: html | |
- store_artifacts: | |
path: ./docs/_build/html |
(the path that gets pushed is not the non-versioned docs)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done (maybe?) in 313f5bf
.github/workflows/test.yml
Outdated
pip install .[all] | ||
- name: Test | ||
run: | | ||
pytest -n 2 -vv --doctest-modules --cov dmriprep --cov-config .coveragerc --cov-report xml:cov.xml dmriprep |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the options to pytest would be better set within the setup.cfg file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done in 0cc7787
Down the rabbit hole we go!
One of the following: - A tag - A branch called "docker/*" - A merge on master.
I have added some github actions workflow to test package builds. Can we split this one and maybe add those workflows we want to keep? |
Closing for now. |
This is what a GA workflow for unit testing might look like.
We can also implement some of the other jobs/pipelines currently implemented by CircleCI: