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

Replace TravisCI with GitHub Actions #796

Merged
merged 18 commits into from
Dec 30, 2021
Merged

Conversation

victorlin
Copy link
Member

@victorlin victorlin commented Dec 3, 2021

Context: for simplicity, we are migrating .travis.yml to a GitHub Actions workflow.

The new workflow does everything that the TravisCI workflow did, with a few tweaks:

Other changes:

  • README: Update build status badge
  • DEV_DOCS: replace references and descriptions of TravisCI
  • devel/test: replace a small reference
  • tests/builds/zika.t: reduce significant digits to pass diff test that currently fails with latest iqtree

References:

@victorlin victorlin self-assigned this Dec 3, 2021
@victorlin
Copy link
Member Author

Interestingly, a test run failed on the Snakemake rule refine_with_temporal_information with a transient LinAlgError:

...
  File "/usr/share/miniconda/envs/test/lib/python3.6/site-packages/treetime/treeregression.py", line 376, in find_best_root
    best_root['cov'] = np.linalg.inv(estimator_hessian)
  File "<__array_function__ internals>", line 6, in inv
  File "/usr/share/miniconda/envs/test/lib/python3.6/site-packages/numpy/linalg/linalg.py", line 546, in inv
    ainv = _umath_linalg.inv(a, signature=signature, extobj=extobj)
  File "/usr/share/miniconda/envs/test/lib/python3.6/site-packages/numpy/linalg/linalg.py", line 88, in _raise_linalgerror_singular
    raise LinAlgError("Singular matrix")
numpy.linalg.LinAlgError: Singular matrix
[Mon Dec  6 18:26:23 2021]
Error in rule refine_with_temporal_information:
...

Looks like something in treetime tried to inverse a singular matrix. I don't know how often this happens, maybe I just got lucky. But it would be nice if we could make this run more deterministically, since these tests should only fail on changes to the codebase. @huddlej or @jameshadfield any thoughts?

@victorlin
Copy link
Member Author

victorlin commented Dec 6, 2021

Currently blocked by codecov/codecov-action#595.

EDIT: unblocked

@victorlin victorlin marked this pull request as ready for review December 7, 2021 00:13
@victorlin victorlin added the priority: low To be resolved after high and moderate priority issues label Dec 8, 2021
@codecov
Copy link

codecov bot commented Dec 29, 2021

Codecov Report

Merging #796 (3794d75) into master (6585427) will decrease coverage by 0.01%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #796      +/-   ##
==========================================
- Coverage   33.79%   33.78%   -0.02%     
==========================================
  Files          41       41              
  Lines        5903     5902       -1     
  Branches     1465     1465              
==========================================
- Hits         1995     1994       -1     
  Misses       3825     3825              
  Partials       83       83              
Impacted Files Coverage Δ
augur/export_v2.py 10.85% <0.00%> (-0.15%) ⬇️

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 6585427...3794d75. Read the comment docs.

tests/builds/zika.t Outdated Show resolved Hide resolved
Copy link
Contributor

@huddlej huddlej left a comment

Choose a reason for hiding this comment

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

This looks really good, @victorlin! I'm still new to GitHub Actions, so I had a couple questions inline below with only one main request (to run CI on any branch without PR, too).

Looking at the logs for the CI runs that failed during your testing in this PR, it looks like GA is smart enough to catch when a specific Python version fails (e.g., 3.8) and cancel the remaining jobs before they finish. Am I interpreting that correctly?

Generally, this looks good and seems like an improvement over Travis. If you don't mind making the change to run CI on all branches, I'd be ok with you merging this.

.github/workflows/ci.yaml Outdated Show resolved Hide resolved
.github/workflows/ci.yaml Show resolved Hide resolved
.github/workflows/ci.yaml Show resolved Hide resolved
@victorlin
Copy link
Member Author

Thanks for the review @huddlej! Requested changes are in so I'll merge now.

Looking at the logs for the CI runs that failed during your testing in this PR, it looks like GA is smart enough to catch when a specific Python version fails (e.g., 3.8) and cancel the remaining jobs before they finish. Am I interpreting that correctly?

As soon as one job fails, it cancels the rest (default behavior with fail-fast). The exact job varies since they start at slightly different times and might be on different shared servers which means varying run times.

@victorlin victorlin merged commit 092879b into master Dec 30, 2021
@victorlin victorlin deleted the victorlin/travis-to-gh branch December 30, 2021 01:24
victorlin added a commit that referenced this pull request Jan 27, 2022
With #796, our CI workflow can now be run on forks of the repo. I'm currently doing development in a fork victorlin/augur, including for this PR, and CI workflows have been failing due to covtest upload failure albeit passing tests.

This PR adds an extra condition on running the codecov upload and deploy step, only under the context of the main GitHub repository.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: low To be resolved after high and moderate priority issues
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

2 participants