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

Switch Travis to GH Actions #61

Merged
merged 2 commits into from
Dec 7, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 44 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Node.js CI

on:
schedule:
- cron: '23 4 * * *' # Once, nightly
push:
branches:
- main
- master
ljharb marked this conversation as resolved.
Show resolved Hide resolved
pull_request:

jobs:

test:

runs-on: ubuntu-latest

strategy:
matrix:
node-version: [ 15, 14, 12, 10 ]
Copy link
Member

Choose a reason for hiding this comment

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

“engines” isn’t set in package.json. Is this the range it should be set to?

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 think I'd rather set the support policy, but in general the engines field is not really expressive enough and is probably outside of scope here anyways.

Copy link
Member

Choose a reason for hiding this comment

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

If the engines field is omitted, its API is "whatever engines the .0.0 works on", so if we don't want to accidentally support v9 or v8 or something, we'd better provide it :-)

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 did create #62 yesterday.

It's not like someone will come and complain that this doesn't work in 8. And if they do - I'm sure we can deal with it.


steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Member Author

@dominykas dominykas Dec 1, 2020

Choose a reason for hiding this comment

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

Your approach does have the benefit of making it much clearer where the matrix applies, alright, but I'm not confident about what I do or don't like about various different GH action approaches, so I'm not sure I'm ready to make this call just yet.

node-version: ${{ matrix.node-version }}
- run: npm install
- run: npm run tests-only

lint:

runs-on: ubuntu-latest

strategy:
matrix:
node-version: [ 14 ]

steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
Copy link
Member

Choose a reason for hiding this comment

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

same here

with:
node-version: ${{ matrix.node-version }}
- run: npm install
- run: npm run lint
20 changes: 0 additions & 20 deletions .travis.yml

This file was deleted.