Skip to content

GH Actions CI #883

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

Merged
merged 12 commits into from
May 28, 2021
Merged

GH Actions CI #883

merged 12 commits into from
May 28, 2021

Conversation

bradshjg
Copy link
Contributor

@bradshjg bradshjg commented Apr 11, 2021

Supercedes #881
Related to #851

This represent a fairly drastic change in how tests are run, previously a single script ci.sh was responsible for running all the steps and appropriately timing and folding the relevant sections. This PR splits the CI steps into separate Actions steps, but doesn't preserve at least one (probably important!) behavior: testing for warnings. Edit: this now does check for warnings but the semantics might differ slightly from ci.sh.

It's not clear to me whether we want to dump all warnings in various steps to a file or create a similar abstraction as ci.sh had where warning checks were sorta built-in to the various steps. I found the indirection in ci.sh painful to follow and personally would probably prefer more explicit (if duplicated) 2> {some_warnings_file} and then a step to crawl through those at the end, but I'm totally open to suggestions. Edit: each test step dumps stderr to a file and then that file is checked for warnings in a later step.

Other potentially controversial things:

  • em-http-request adds headers by default, and in the test suite there's very reasonable header tests that get broken by this behavior. I opted to update the request options in a way that omits those headers so the tests pass as written, but it's kinda weird and fragile but hey they started it! 😄
  • I skipped a flaky multi-threaded test. See Allow Excon >= 0.62.0 #814 for a little more context.

@bradshjg bradshjg changed the title VCR GH Actions CI GH Actions CI Apr 11, 2021
@bradshjg bradshjg marked this pull request as draft April 11, 2021 03:03
@bradshjg bradshjg marked this pull request as ready for review April 11, 2021 19:27
@bradshjg
Copy link
Contributor Author

bradshjg commented Apr 11, 2021

Sorry to open a new PR about this, but the other one was long enough ago that I completely re-imagined how I wanted to do this. I hope this makes sense to y'all too.

Things we talked about that I want to highlight:

"let us experiment until we get to 🟢 green builds in this PR".

That's the spirit I went with, which means stuff like

Can we add in "3.0" as well here?

I omitted because it is going to break and that probably deserves its own PR.

So I want to merge this as a part 1 for a 2 part series. A lot of the script stuff is really just a hack to get what we have in github actions today, for example spinning up a http server.

Totally agreed, this should be relatively straightforward to add in a followup PR. Though AFAICT the server running on another thread isn't part of ci.sh but rather baked into the test suite itself (regardless the extraction would be a 👍 from me and I'd be happy to do that in a follow up...I'm more comfortable with containers than Ruby 😄 ).

@krainboltgreene
Copy link
Contributor

Okay, so what do we need to get this merged? If we have to strip stuff out that's fine, we can always work on readding those things, but I would love a list of things we're leaving behind.

@bradshjg
Copy link
Contributor Author

bradshjg commented Apr 11, 2021

Okay, so what do we need to get this merged? If we have to strip stuff out that's fine, we can always work on readding those things, but I would love a list of things we're leaving behind.

The only thing I know that we're dropping with respect to testing is a test for the vcr library emitting warnings (with careful attention to exiting cleanly if only dependencies emit warnings) Edit: warning check is done, but I'd still love a second set of 👀 on the implementation.

I also would like to drop the entire script/ folder before merge, but that's because I like my PRs 🟥 🟥 😄

Edit: Sorry, as mentioned in the description we're also now skipping a flakey test...I'm on the side of merge and then fix later...but later often means never 😢

@bradshjg
Copy link
Contributor Author

bradshjg commented May 28, 2021

@olleolleolle @krainboltgreene gentle bump to see if there's anything I can do to help to move this forward (and apologies for the direct mentions if they prove less than helpful) 😄

on:
push:
branches: [ $default-branch ]
pull_request:
Copy link
Member

Choose a reason for hiding this comment

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

I'm curious if this alias for default branch does the right thing. It's be cool.

olleolleolle
olleolleolle previously approved these changes May 28, 2021
Copy link
Member

@olleolleolle olleolleolle left a comment

Choose a reason for hiding this comment

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

In order to keep the momentum, @bradshjg, let's merge this, which added a single defined skip, which can be investigated. Warnings are collected and analyzed.

Em-http-related testing fixes for reproducibility could potentially be a separate thing, but I'm OK with those spec changes landing at the same time.

I had a tiny note about the $default-branch name, which is easy to see if it worked or not, after a merge. Otherwise, we can change it to the relevant string before merge. Your call, @bradshjg. Update: I made the change to an explicit literal string with the default branch name in it.

In all, this looks like future to me. That is, 👍 !

Copy link
Member

@olleolleolle olleolleolle left a comment

Choose a reason for hiding this comment

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

Clear ahead!

bild

@olleolleolle olleolleolle merged commit d6df96d into vcr:master May 28, 2021
@olleolleolle
Copy link
Member

@bradshjg Hooray! Thank you so much for your hard work in creating this!

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.

3 participants