Skip to content

Replace CircleCI with GitHub Action#734

Merged
computron merged 7 commits intohackingmaterials:mainfrom
janosh:github-action
Jan 19, 2022
Merged

Replace CircleCI with GitHub Action#734
computron merged 7 commits intohackingmaterials:mainfrom
janosh:github-action

Conversation

@janosh
Copy link
Member

@janosh janosh commented Jan 13, 2022

Continuing first attempt that was aborted in #730.

@janosh
Copy link
Member Author

janosh commented Jan 17, 2022

After a lot of fiddling, openbabel finally successfully installs (sudo ln -s /usr/include/openbabel3 /usr/local/include/openbabel3 as suggested by @fredrikw did the trick) and pytest can actually run. For some reason, GH runs way longer than CircleCI (47 min vs 6 min). Not sure why. Doesn't look like CircleCI does any under the hood caching.

GH action:

= 2 failed, 116 passed, 82 skipped, 224 warnings, 4 errors in 2634.36s (0:43:54) =

CircleCI:

========== 124 passed, 80 skipped, 650 warnings in 202.02s (0:03:22) ===========

In any case, we might be able to bring this down a lot by using something pytest-split.

@janosh janosh mentioned this pull request Jan 19, 2022
@janosh
Copy link
Member Author

janosh commented Jan 19, 2022

We need to start pinning pymongo<4.0.0 since on CircleCI, deps were installed with conda whereas on with GH action we're using pip install. On Anaconda, latest pymongo is v3.12.0 whereas on PyPI, it's already v4.0.1 which is why compat issues did not show up before.

atomate is not upwards compatible due to e.g.

/home/runner/work/atomate/atomate/atomate/utils/testing.py:88: in tearDown
    for coll in db.collection_names():
TypeError: 'Collection' object is not callable. If you meant to call the 'collection_names' method on a 'Database' object it is failing because no such method exists.

@janosh
Copy link
Member Author

janosh commented Jan 19, 2022

Looks like there were a few tests in

  • atomate/vasp/analysis/linear_response.py
  • atomate/vasp/workflows/tests/test_insertion_workflow.py

that would have failed even after the "Fix CI" PR #730 if they hadn't been skipped by pytest. Pinning pymongo<4.0.0 or something else seems to have unskipped them and now they fail. Will fix as part of this PR.

@janosh
Copy link
Member Author

janosh commented Jan 19, 2022

All green! 🎉 🟢

Just a final note that my comment above about GHA being slow was premature.

The much longer run time on GH action was due to me not spinning up a MongoDB server there yet. So every DB connection was timing out which of course took a long time. With that fixed, GH action is still a small amount slower (10m 24s circle vs 12m 25s GHA).

I asked @asottile about that who said

I think their machines might be slightly beefier -- also circle tends to start sooner than GHA -- circle was basically the only one on par with http://pre-commit.ci in start time (not in execution time though1)

So this slight slowdown seems to be expected. Hence, ready for review here.

@janosh
Copy link
Member Author

janosh commented Jan 19, 2022

One more point: I think we should keep the CircleCI workflow running for a while to make sure there are no further discrepancies between CI runs. Maybe after we transition to latest pymatgen with only py38+ support, we can drop CircleCI unless @computron or someone wants to keep it permanently.

@janosh janosh mentioned this pull request Jan 19, 2022
@computron
Copy link
Contributor

Merging this prior to new atomate release

@computron computron merged commit 863be07 into hackingmaterials:main Jan 19, 2022
@janosh janosh deleted the github-action branch January 19, 2022 16:35
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