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

chore: switch to github actions #809

Merged
merged 4 commits into from
Nov 4, 2020
Merged

Conversation

kentcdodds
Copy link
Member

Because Travis gave OSS the shaft... https://blog.travis-ci.com/2020-11-02-travis-ci-new-billing

This works: https://github.com/kentcdodds/generator-kcd-oss/releases/tag/v4.9.0

We've got the NPM_TOKEN set at the org-level so we're solid 👍

We won't actually know if the release works until we have a release, but 🤷‍♂️

@codesandbox-ci
Copy link

codesandbox-ci bot commented Nov 4, 2020

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit c926105:

Sandbox Source
react-testing-library-examples Configuration

@codecov
Copy link

codecov bot commented Nov 4, 2020

Codecov Report

Merging #809 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##            master      #809    +/-   ##
==========================================
  Coverage   100.00%   100.00%            
==========================================
  Files           26        26            
  Lines          719       911   +192     
  Branches       184       277    +93     
==========================================
+ Hits           719       911   +192     
Impacted Files Coverage Δ
src/config.js 100.00% <0.00%> (ø)
src/events.js 100.00% <0.00%> (ø)
src/screen.js 100.00% <0.00%> (ø)
src/helpers.js 100.00% <0.00%> (ø)
src/matches.js 100.00% <0.00%> (ø)
src/wait-for.js 100.00% <0.00%> (ø)
src/pretty-dom.js 100.00% <0.00%> (ø)
src/suggestions.js 100.00% <0.00%> (ø)
src/queries/role.js 100.00% <0.00%> (ø)
src/queries/text.js 100.00% <0.00%> (ø)
... and 15 more

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 b5731ba...c926105. Read the comment docs.

main:
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
Copy link
Member

Choose a reason for hiding this comment

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

Do we need windows here? May be worth trying but might drain free minutes since it doubles the number of runs.

Copy link
Member Author

Choose a reason for hiding this comment

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

Unless I'm reading this incorrectly, there is no limit to how much time the jobs run in total, only in how long an individual job runs: https://docs.github.com/en/free-pro-team@latest/actions/reference/usage-limits-billing-and-administration

There's also a limit on concurrency, but that's probably not a concern either I think.

Copy link
Member

Choose a reason for hiding this comment

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

There's also a limit on concurrency, but that's probably not a concern either I think.

There are only 20 per account. dom-testing-library alone now uses 8 instead of 4. I'm missing some context why we need to introduce the windows run.

Copy link
Member Author

Choose a reason for hiding this comment

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

I guess I figured it was easy and "free," but I guess we can drop windows 👍

main:
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
Copy link
Member Author

Choose a reason for hiding this comment

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

Unless I'm reading this incorrectly, there is no limit to how much time the jobs run in total, only in how long an individual job runs: https://docs.github.com/en/free-pro-team@latest/actions/reference/usage-limits-billing-and-administration

There's also a limit on concurrency, but that's probably not a concern either I think.

needs: main
runs-on: ubuntu-latest
if:
${{ contains('master,beta,next,alpha', github.base_ref) &&
Copy link
Member Author

Choose a reason for hiding this comment

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

This doesn't appear to work. This job should not run on this PR but it is... I'm not sure how else to skip this job for non-release branches 🤔

Copy link
Collaborator

Choose a reason for hiding this comment

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

Not 100%, but the docs say github.base_ref is only present on pull_request events. So it might be treating it like an empty string and it is matching the contains function. Just a possible guess to try something like ${{ github.base_ref != '' && contains(... or ${{ contains(..., github.base_ref || 'not-found').

Copy link
Member Author

Choose a reason for hiding this comment

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

Oh yeah! I think I need to use ref 👍 Thanks!

@kentcdodds
Copy link
Member Author

Alright! I think we're ready to make this happen!

Now I just need to apply this same change to LITERALLY EVERY REPO I MAINTAIN 😱

Sure wish it were easier to share these action configs 🙄

@kentcdodds kentcdodds merged commit 3092c69 into master Nov 4, 2020
@kentcdodds kentcdodds deleted the pr/use-actions-instead branch November 4, 2020 20:43
@MatanBobi
Copy link
Member

Alright! I think we're ready to make this happen!

Now I just need to apply this same change to LITERALLY EVERY REPO I MAINTAIN 😱

Sure wish it were easier to share these action configs 🙄

That's odd that unlike gitlab-ci, there's no extend/include flow in github actions (at least I didn't find this in the documentation).

Need some help with applying the change in other repos?

@afontcu
Copy link
Member

afontcu commented Nov 5, 2020

Alright! I think we're ready to make this happen!

Now I just need to apply this same change to LITERALLY EVERY REPO I MAINTAIN 😱

Sure wish it were easier to share these action configs 🙄

Just found this https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/sharing-workflows-with-your-organization, not sure if it helps?

kentcdodds added a commit that referenced this pull request Nov 5, 2020
@kentcdodds
Copy link
Member Author

@MatanBobi, thanks for the offer! Feel free to make PRs. I'm thinking about making a custom action that does everything so it's easier to keep up-to-date.

@afontcu, thanks. Unfortunately that's just a way to make a template which is only marginally helpful. I want to be able to keep things up-to-date without having to update every repo.

@MatanBobi
Copy link
Member

@kentcdodds would you like me to wait for the custom action or can I start adding this workflow in our other repos? :)

@kentcdodds
Copy link
Member Author

I don't think custom actions will work very well, so you can go ahead. One thing I haven't figured out yet is how to properly ignore all-acontributers branches for pull requests. Other than that, generator-kcd-oss's validate job is pretty good 👍

@github-actions
Copy link

🎉 This PR is included in version 7.26.6 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants