-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Move to Github Actions #785
Move to Github Actions #785
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree that this is a great move. Approved!!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since we're moving to Actions, it makes sense to remove the .travis.yml file.
Co-authored-by: Linus Unnebäck <linus@folkdatorn.se>
Signed-off-by: Moni <40552237+NotMoni@users.noreply.github.com>
Done 🦄 |
.github/workflows/nodejs.yml
Outdated
- run: npm run lint | ||
- run: npm run coverage | ||
env: | ||
CI: true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
GitHub Actions sets CI automatically now: https://github.blog/changelog/2020-04-15-github-actions-sets-the-ci-environment-variable-to-true/
Coveralls have their own GitHub Actions, so, it's probably better to use it than to run coverage script: https://github.com/coverallsapp/github-action
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
GitHub Actions sets CI automatically now
Awesome 😍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
GitHub Actions sets CI automatically now: https://github.blog/changelog/2020-04-15-github-actions-sets-the-ci-environment-variable-to-true/
Coveralls have their own GitHub Actions, so, it's probably better to use it than to run coverage script: https://github.com/coverallsapp/github-action
So use coveralls?
.github/workflows/nodejs.yml
Outdated
uses: actions/setup-node@v1 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
- run: npm run lint |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's better to separate lint into a single action - this way it will run only once on a selected version of Node/OS and give faster and more prominent feedback to a contributor.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree. Could we make it a separate workflow? First node then lint?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yea, Should I make it two files?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, that what I mean
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@NotMoni Yes make it into 2 files.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure 👍
Signed-off-by: Moni <40552237+NotMoni@users.noreply.github.com>
Signed-off-by: Moni <40552237+NotMoni@users.noreply.github.com>
Signed-off-by: Moni <40552237+NotMoni@users.noreply.github.com>
Signed-off-by: Moni <40552237+NotMoni@users.noreply.github.com>
@larson-carter and @tinovyatkin |
.github/workflows/lint.yml
Outdated
name: Lint CI | ||
|
||
on: | ||
[push, pull_request] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It makes no sense to lint on a push as nobody will see/check that. Keep just pull_request
here
.github/workflows/lint.yml
Outdated
[push, pull_request] | ||
|
||
jobs: | ||
build: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think lint
is better named for the task here. It will be visible in check and may confuse.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree.
.github/workflows/lint.yml
Outdated
runs-on: [ubuntu-latest, macos-latest, ubuntu-16.04] | ||
|
||
strategy: | ||
matrix: | ||
node-version: [10.x, 12.x, 14.x] | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: ${{ matrix.node-version }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's a real overkill to lint on 9 platforms. Just run on Ununtu latest with the Node LTS (12.x) - we are not testing ESLint here, we linting our code.
.github/workflows/coverage.yml
Outdated
@@ -0,0 +1,22 @@ | |||
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node | |||
name: Coverage CI |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the coverage is a bad name here. Just CI or Test. Coverage is a function from tests.
.github/workflows/coverage.yml
Outdated
name: Coverage CI | ||
|
||
on: | ||
[push, pull_request] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think just pull_request here is enough, we currently don't have any automatic deploy in place, so, CI result on a push is irrelevant.
.github/workflows/coverage.yml
Outdated
runs-on: [ubuntu-latest, macos-latest, ubuntu-16.04] | ||
|
||
strategy: | ||
matrix: | ||
node-version: [10.x, 12.x, 14.x] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Again, I believe 9 tests is too much for the library that doesn't have any platform-specific code.
We can test only on latest Node for macOs an test on windows instead of old Ubuntu:
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macOS-latest]
node: [14.x, 12.x, 10.x]
exclude:
# On Windows, run tests with only the LTS environments.
- os: windows-latest
node: 10.x
- os: windows-latest
node: 14.x
# On macOS, run tests with only the LTS environments.
- os: macOS-latest
node: 10.x
- os: macOS-latest
node: 14.x
runs-on: ${{ matrix.os }}
.github/workflows/coverage.yml
Outdated
uses: actions/setup-node@v1 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
- run: npm run coverage |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
npm run coverage
does nothing if npm test
wasn't run before.
Please check #805 as if it will be merged we will need a special step and condition to test on Node 10.x
Runs only on: Ubuntu & Node.js LTS
Signed-off-by: Moni <40552237+NotMoni@users.noreply.github.com>
@tinovyatkin I think I fixed all your suggestions. 👀 |
@NotMoni Remember to update the badge in README before/just after merging ;) |
@xxczaki Ahhhh yea, sure mate 👍 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We just have 2 suggestions that need to be merged into this PR. Then it will be ready to be pulled.
Hey @larson-carter , I will update it later today. Busy rn. |
Co-authored-by: Konstantin Vyatkin <tino@vtkn.io>
Co-authored-by: Konstantin Vyatkin <tino@vtkn.io>
cc/ @larson-carter |
I have added the badge link, but it won't be rendered since we have not enable action on this repo until this PR gets merged. |
No description provided.