Skip to content

chore: switch to github actions#809

Merged
kentcdodds merged 4 commits into
masterfrom
pr/use-actions-instead
Nov 4, 2020
Merged

chore: switch to github actions#809
kentcdodds merged 4 commits into
masterfrom
pr/use-actions-instead

Conversation

@kentcdodds

Copy link
Copy Markdown
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

codesandbox-ci Bot commented Nov 4, 2020

Copy link
Copy Markdown

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

codecov Bot commented Nov 4, 2020

Copy link
Copy Markdown

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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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.

Comment thread .github/workflows/validate.yml Outdated
needs: main
runs-on: ubuntu-latest
if:
${{ contains('master,beta,next,alpha', github.base_ref) &&

Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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

afontcu commented Nov 5, 2020

Copy link
Copy Markdown
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 🙄

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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown

🎉 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