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

Convert all publiclab repositories' automated tests/checks from TravisCI to GitHub Actions #9641

Open
19 of 36 tasks
jywarren opened this issue May 18, 2021 · 21 comments
Open
19 of 36 tasks
Labels
feature explains that the issue is to add a new feature multiple-use planning Planning issues! testing issues are usually for adding unit tests, integration tests or any other tests for a feature

Comments

@jywarren
Copy link
Member

jywarren commented May 18, 2021

Multi-repository coordinating issue:

starting in #8793, we developed a plan to move all PL repositories from Travis CI to GitHub Actions, and have made a lot of progress. But there are many repositories still to go, so we are coordinating here.

If you'd like to try, unfortunately the PR must be created by a maintainer (for security purposes) but we'd love help as far as it's possible.

Try looking in the "DONE" section for examples of successful conversions of projects with similar architecture!

NOTE: the PR has to be opened from within the main fork, not from for example jywarren/gh-actions. See publiclab/infragram#157

Remaining Travis => GitHub Actions migrations

Done

Badges

The new badge is in the format: https://github.com/publiclab/plots2/workflows/tests/badge.svg?branch=main

To get them running on the main branch, publiclab/PublicLab.Editor#740 may be needed

And we can link it to: https://github.com/publiclab/plots2/actions (or another more specific one like https://github.com/publiclab/plots2/actions/workflows/tests.yml?query=branch%3Amain ? I can't find a route showing just those tests run on the publiclab/plots2 main branch though...

Badges changed

@jywarren jywarren added testing issues are usually for adding unit tests, integration tests or any other tests for a feature feature explains that the issue is to add a new feature planning Planning issues! multiple-use labels May 18, 2021
@govindgoel
Copy link
Member

@jywarren I would start working on this.

@muokicaleb
Copy link

@jywarren I'd like to help with this issue.

@bajajvinamr
Copy link
Contributor

@jywarren I'd like to work on this

@jywarren
Copy link
Member Author

Hi all - thank you for your support! I'm currently working on this in publiclab/spectral-workbench#647 (my top priority) and in publiclab/mapknitter#1489 (2nd priority). I've made progress on the first but slowly trying to eliminate remaining errors, reading the log carefully each time. Any input/help/tips/support appreciated!!!

@aliciapaz
Copy link
Contributor

Hello @jywarren, @govindgoel, and everyone else!
Today I'm officially joining the GitHub Actions Migrations Task Force (or GAMTF) :octocat: 🚣🏽‍♀️ (yes I invented the name myself)

Given the list above, what do you think is the best one to start?
My first thought is to go with the smaller repositories first (i.e: webjack?), but I'm open to suggestions.

Thank you all and have a wonderful week.

@jywarren
Copy link
Member Author

jywarren commented Aug 3, 2021

Hi Alicia!!!!! Welcome!!! I'm so sorry I missed this as my notifications are quite narrowly tuned (you could imagine how many i get across all PL projects) - my sincere apologies. I've reached out on Gitter as well.

I think trying a smaller repository first to get the hang of it is a great idea. Then, taking them in order perhaps - i've ordered them with top = highest priority. And, I'll add your name to my notification filters! Thanks!!! May you have a wonderful week as well!

@jywarren
Copy link
Member Author

This list is looking great! Excellent work, @aliciapaz!!

I'm also noting we will have to go back and add correct "CI passing" badges which I noticed in https://github.com/publiclab/image-sequencer#image-sequencer (still has the old Travis badge).

The new badge is: https://github.com/publiclab/plots2/workflows/tests/badge.svg?branch=main

And we can link it to: https://github.com/publiclab/plots2/actions (or another more specific one like https://github.com/publiclab/plots2/actions/workflows/tests.yml?query=branch%3Amain ? I can't find a route showing just those tests run on the publiclab/plots2 main branch though...

@govindgoel
Copy link
Member

@jywarren along with the CI changes we can change the badge too. Thanks for the new badge URL. Meanwhile, I will look wherever the changes are needed.

@aliciapaz I also missed this, but I liked the name you invented for the task. Thanks

@aliciapaz
Copy link
Contributor

@govindgoel so you will change the badges in the already migrated repositories, am I right?
@jywarren I'm currently working on mapknitter (based on work by @cesswairimu, thanks!)
Having some issues but so far nothing different from the ones you had in SWB.
Hopefully, I'll get it done by today/tomorrow!

Thanks to both!

@govindgoel
Copy link
Member

@aliciapaz Yeah will work on that also will take up a repo to migrate to actions.

Thanks

@jywarren
Copy link
Member Author

jywarren commented Aug 18, 2021 via email

@jywarren
Copy link
Member Author

OK - i made a new checklist for the badges. If we could get a more specific link for the badge that would be great, though - only recent runs of "tests" on main branch of publiclab's fork?

@govindgoel
Copy link
Member

Okay @jywarren will look for that.

@aliciapaz
Copy link
Contributor

aliciapaz commented Sep 21, 2021

@govindgoel we can use filters to achieve what @jywarren suggests:
For example, to show recent runs of tests on the main branch of plots2:
https://github.com/publiclab/plots2/actions/workflows/tests.yml?query=branch%3Amain

@jywarren
Copy link
Member Author

I was able to do this in mapknitter -- unfortunately if we limit to main branch we get no status because there's no tests run on main - just on the PRs /before/ merging to main... a conundrum!

If we don't limit to main, then we get a failure because it reports output of ALL branches, including many which aren't merged yet.

main - https://github.com/publiclab/mapknitter/actions/workflows/tests.yml/badge.svg

vs

main - https://github.com/publiclab/mapknitter/actions/workflows/tests.yml/badge.svg?branch=main

Originally posted by @jywarren in publiclab/mapknitter#1541 (comment)

@jywarren
Copy link
Member Author

jywarren commented Oct 19, 2021

Same on Spectral Workbench: publiclab/spectral-workbench@5fa3c00

So I was trying to set up a github actions run that'll run the tests one more time after merge, but I think i wasn't quite able to get that working...

#9915 now shows green for plots2, BUT, it does occasionally fail because it's a re-run of the tests, and some tests are intermittent like #10341

AND unfortunately it runs on the main branch of ALL PRs, even if it's someone else's fork -- like https://github.com/publiclab/plots2/actions/runs/1358791409 - which happens a lot with first-timers. We could try discouraging it more, but it'll happen.

So the outcome is that for 2 different common reasons, this will end up showing failing tests pretty often.

I'd like to figure out a way we can either:

  1. get a merged PR's test run accepted as passed for the main branch??
  2. filter for workflow runs that were run on publiclab/plots2 main branch, and nobody else's
  3. filter for workflow runs that were on merged PRs only

So, for now we just have some grey badges but if we can fix them we can get this reporting properly again!

@jywarren
Copy link
Member Author

Same at this useful badge generator; https://actions-badge.atrox.dev/

image

See how although the last PR at #10329 passed fine, it links to this interesting view of several runs where the first passed, but the last failed; presumably all would need to pass for this to work:

https://github.com/publiclab/plots2/runs/3941473010

However, maybe this is slight progress, as I wonder if it's only checking publiclab/plots2 main branch runs.

jywarren added a commit to publiclab/mapknitter that referenced this issue Oct 19, 2021
@jywarren
Copy link
Member Author

OK trying to trigger post-merge tests on main branch in mapknitter, which I think will be simpler and more consistent anyways: publiclab/mapknitter@f658f60

@aliciapaz
Copy link
Contributor

@jywarren if that works for mapknitter, shall we do the same for the rest?
Thanks!

@jywarren
Copy link
Member Author

Yeah i think so -- but it doesn't seem to have worked! publiclab/mapknitter#1544

Did I miss something?

@jywarren
Copy link
Member Author

I am monitoring here, but don't see any just after it was merged: https://github.com/publiclab/mapknitter/actions

Also it's weird - apparently it'd be the default branch on the default badge:

Tests and CI/CD jobs

I'm not sure if that actually worked because when i switch it to "main" it shows no runs:

Tests and CI/CD jobs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature explains that the issue is to add a new feature multiple-use planning Planning issues! testing issues are usually for adding unit tests, integration tests or any other tests for a feature
Projects
None yet
Development

No branches or pull requests

5 participants