Skip to content

Move from TavisCI to GitHub Actions #772

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

Closed
wants to merge 5 commits into from

Conversation

eps1lon
Copy link
Member

@eps1lon eps1lon commented Nov 23, 2021

Copy link
Member

@koba04 koba04 left a comment

Choose a reason for hiding this comment

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

@eps1lon Thank you for your work, this is great👍
To move CI from TravisCI to GitHub Actions, we also have to migrate semantic-release, so we need @jquense's help.

Comment on lines +19 to +22
- name: Use Node.js 14
uses: actions/setup-node@v2
with:
node-version: 14
Copy link
Member

Choose a reason for hiding this comment

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

The current active LTS version of Node is 16, so v16 seems to be better.

https://nodejs.org/en/

Suggested change
- name: Use Node.js 14
uses: actions/setup-node@v2
with:
node-version: 14
- name: Use Node.js 16
uses: actions/setup-node@v2
with:
node-version: 16

Copy link
Member Author

Choose a reason for hiding this comment

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

The goal of this PR was to move from Travis to GitHub actions. Travis was running on node 14. I think we should do this in a follow-up.

- run: yarn --cwd www
- run: yarn test
- run: npm run build
- run: npm run semantic-release
Copy link
Member

Choose a reason for hiding this comment

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

I guess this wouldn't work on GitHub Actions because this requires tokens like NPM_TOKEN and GITHUB_TOKEN, which would be set on TravisCI.

    env:
      GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
      NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

Unfortunately, I don't have permission to set up semantic-release.
@jquense Could you help us?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, I forgot to mention that an admin needs to setup secrets.

Copy link
Member

Choose a reason for hiding this comment

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

What about removing the script?
Personally, I think it's good to release a new version manually instead of doing it on CI. I don't have the permission though.

Copy link
Member

Choose a reason for hiding this comment

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

I'd like to introduce some breaking changes like dropping IE support and removing PropTypes in the future. In that time, I'd like to release the breaking changes as a single major version, not separately.
But we can't do that because this script releases a new version automatically, so I'd like to remove running semantic-release on CI.

Copy link
Member Author

Choose a reason for hiding this comment

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

We can collect breaking changes on an alpha branch and merge that once it's ready. semantic-release will create an alpha release channel from that branch for test. We're doing that for @testing-library/react and it has been working great so far.

@eps1lon
Copy link
Member Author

eps1lon commented Jan 13, 2022

Will re-open from this remote. Otherwise we'll not get a run. Once it's merged forks will trigger Actions.

@eps1lon eps1lon closed this Jan 13, 2022
@eps1lon eps1lon deleted the gh-actions branch January 13, 2022 19:48
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