Skip to content
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

Closed
wants to merge 23 commits into from
Closed

WIP: Github actions #52

wants to merge 23 commits into from

Conversation

arokem
Copy link
Collaborator

@arokem arokem commented Jan 14, 2020

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:

  • Doc building
  • Deploying to PyPI (need to deal with versioneer)

@pull-assistant
Copy link

pull-assistant bot commented Jan 14, 2020

@codecov
Copy link

codecov bot commented Jan 14, 2020

Codecov Report

Merging #52 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           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.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5bd7fcf...d02f1d5. Read the comment docs.

@arokem
Copy link
Collaborator Author

arokem commented Jan 14, 2020

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.

@arokem
Copy link
Collaborator Author

arokem commented Jan 15, 2020

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.

pip install .[all]
- name: Build docs
run: |
cd docs
Copy link
Member

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)

- name: Build docs
run: |
cd docs
make html
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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
Copy link
Member

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:

- 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)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done (maybe?) in 313f5bf

pip install .[all]
- name: Test
run: |
pytest -n 2 -vv --doctest-modules --cov dmriprep --cov-config .coveragerc --cov-report xml:cov.xml dmriprep
Copy link
Member

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.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done in 0cc7787

@oesteban
Copy link
Member

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?

@oesteban
Copy link
Member

Closing for now.

@oesteban oesteban closed this May 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants