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

TST/CI: Split Circle workflow #2386

Merged
merged 28 commits into from
Feb 15, 2018
Merged

TST/CI: Split Circle workflow #2386

merged 28 commits into from
Feb 15, 2018

Conversation

effigies
Copy link
Member

@effigies effigies commented Jan 20, 2018

Updating with todo list from comment thread:


Original text

This PR tracks an attempt to split out the testing process into a workflow of single-container jobs using the Circle 2.0 workflows. The goal is to reduce the amount of time containers are allocated but idle, and allow multiple PRs to do some simultaneous testing.

Follow up to #2202.

Comments and suggestions welcome. cc @kaczmarj

@effigies effigies force-pushed the ci/workflow branch 2 times, most recently from a80dbbd to 7133d79 Compare January 20, 2018 20:56
@effigies
Copy link
Member Author

This is working. There's a definite slowdown due to saving and loading images, so perhaps builds should be moved back into the test jobs. Still, it looks like we can achieve concurrency across PRs.

@effigies
Copy link
Member Author

From the latest build:

17:58 to build images
15:14 to tarball images and persist to workspace

12:38 -12:47 to attach to workspace and load images

So for a cost of about 5 minutes per test job, we can skip a 30 minute bottleneck. Seems like a good trade-off.

@effigies effigies force-pushed the ci/workflow branch 3 times, most recently from 04eeaef to 7e7dd79 Compare January 24, 2018 16:31
Copy link
Contributor

@oesteban oesteban left a comment

Choose a reason for hiding this comment

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

This is a wonderful effort. LGTM. Left a few comments.

- image: docker:17.10.0-ce-git
working_directory: /home/circleci/nipype
steps:
- setup_remote_docker
Copy link
Contributor

Choose a reason for hiding this comment

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

the remote docker might be useful when building, but it is not necessary for running. I may be wrong, but I think that remote docker does not allow mounting, and you need to do docker cp. The different jobs may be just using the local docker install. IMHO this line can be removed on the test jobs.

command: |
pip install --no-cache-dir codecov
- run:
name: Download test data
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe we can even split further and take this out as a different job?

environment:
WORKDIR: /home/circleci/work
command: |
mkdir -p "$WORKDIR"
chmod -R 777 "$WORKDIR"
bash /home/circleci/nipype/.circleci/tests.sh
bash /home/circleci/nipype/.circleci/pytests.sh
- store_artifacts:
Copy link
Contributor

Choose a reason for hiding this comment

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

I'd use store_test_results here, so we can have the test summary.

@effigies effigies changed the title [WIP] CI: Split Circle workflow TST/CI: Split Circle workflow Jan 30, 2018
@oesteban
Copy link
Contributor

oesteban commented Feb 7, 2018

@kaczmarj could you have a quick look? Thanks!

@effigies
Copy link
Member Author

effigies commented Feb 7, 2018

There are some issues with codecov not pointing to the right files. I think I want to move the codecov to its own entry in Circle, which would let us simplify the script structure, too.

I just haven't found much time to figure out where the coverage files are/should be.

@satra
Copy link
Member

satra commented Feb 7, 2018

also we should ensure that some of the artifacts are being saved, such as the built docs and the coverage files.

@oesteban
Copy link
Contributor

oesteban commented Feb 7, 2018

oh, one more: use set up the test summaries (https://circleci.com/docs/2.0/configuration-reference/#store_test_results) so that circle can show us number of tests and time in the test_build job

@effigies
Copy link
Member Author

effigies commented Feb 7, 2018

Well, this branch is open to pushes from team members...

Anyway, I can try to find some time later this week, but I think it's going to take a couple periods of sustained attention, so no definite time frame.

@kaczmarj
Copy link
Collaborator

kaczmarj commented Feb 7, 2018

@effigies @oesteban - I will look soon. This is an exciting pr!

@kaczmarj
Copy link
Collaborator

kaczmarj commented Feb 9, 2018

Sorry for the delay. This looks great to me. One thing I would suggest is to reduce duplication in in .circleci/config.yml with yaml pointers. Common procedures can be defined once and referenced multiple times.

For example:

_modify_nipype_version: &modify_nipype_version
  name: Modify Nipype version if necessary
  command: |
    if [ "$CIRCLE_TAG" != "" ]; then
      sed -i -E "s/(__version__ = )'[A-Za-z0-9.-]+'/\1'$CIRCLE_TAG'/" nipype/info.py
    fi
# ...
- run: *modify_nipype_version
# ...
- run: *modify_nipype_version

I can try to add this over the weekend. Otherwise this looks great!

@effigies
Copy link
Member Author

effigies commented Feb 9, 2018 via email

@kaczmarj
Copy link
Collaborator

@effigies - I am working on this now

@effigies
Copy link
Member Author

This is ready for review. Docs and coverage are in the artifacts. Codecov is pushing pull request numbers again, which should start showing up again once this hits master. And test summaries show up for the test_pytest entry.

@satra
Copy link
Member

satra commented Feb 15, 2018

thanks @effigies - this looks good.

@satra satra merged commit 166e06c into nipy:master Feb 15, 2018
@effigies effigies deleted the ci/workflow branch February 15, 2018 02:18
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.

4 participants