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 from Travis CI to GitHub Actions #504

Merged
merged 20 commits into from Feb 11, 2020
Merged
Show file tree
Hide file tree
Changes from 12 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
62 changes: 62 additions & 0 deletions .github/workflows/ci.yml
@@ -0,0 +1,62 @@
name: CI

on:
- push
- pull_request

jobs:
test:
name: Node.js ${{ matrix.node_version }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
node_version:
- 13
- 12
- 10
os:
- ubuntu-latest
- windows-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node_version }}
- run: npm install
- run: npm run test
- uses: coverallsapp/github-action@master
continue-on-error: true
with:
github-token: ${{ secrets.github_token }}
parallel: true

coverage:
needs: test
runs-on: ubuntu-latest
steps:
- uses: coverallsapp/github-action@master
continue-on-error: true
with:
github-token: ${{ secrets.github_token }}
parallel-finished: true
Copy link
Owner

Choose a reason for hiding this comment

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

Why cannot this just be part of the test job? I don't see what it does differently from the code in the test job either.

Copy link
Collaborator

Choose a reason for hiding this comment

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

This job send a webhook to coveralls, need wait for all test job finished.

See #504 (comment) and #504 (comment)

Copy link
Owner

Choose a reason for hiding this comment

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

Why though? We only need coveralls to run in one of the test job, not all.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I removed parallel, and add a condition. only run on node.js 12 on linux


lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 12
- run: npm install
- run: npm run lint

integration:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 12
- run: npm install
- run: npm run integration
18 changes: 0 additions & 18 deletions .travis.yml

This file was deleted.

7 changes: 5 additions & 2 deletions package.json
Expand Up @@ -14,7 +14,7 @@
"node": ">=10"
},
"scripts": {
"test": "xo && nyc ava",
"test": "xo && nyc --reporter=lcov ava",
fisker marked this conversation as resolved.
Show resolved Hide resolved
"lint": "node ./test/lint/lint.js",
"integration": "node ./test/integration/test.js"
},
Expand Down Expand Up @@ -92,6 +92,9 @@
"eslint-plugin/require-meta-docs-url": "off"
}
}
]
],
"rules": {
"import/order": "off"
}
Comment on lines +101 to +103
Copy link
Collaborator

Choose a reason for hiding this comment

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

Copy link
Collaborator

Choose a reason for hiding this comment

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

}
}
2 changes: 1 addition & 1 deletion readme.md
@@ -1,4 +1,4 @@
# eslint-plugin-unicorn [![Build Status](https://travis-ci.org/sindresorhus/eslint-plugin-unicorn.svg?branch=master)](https://travis-ci.org/sindresorhus/eslint-plugin-unicorn) [![Coverage Status](https://coveralls.io/repos/github/sindresorhus/eslint-plugin-unicorn/badge.svg?branch=master)](https://coveralls.io/github/sindresorhus/eslint-plugin-unicorn?branch=master)
# eslint-plugin-unicorn ![Build Status](https://github.com/sindresorhus/eslint-plugin-unicorn/workflows/CI/badge.svg) [![Coverage Status](https://coveralls.io/repos/github/sindresorhus/eslint-plugin-unicorn/badge.svg?branch=master)](https://coveralls.io/github/sindresorhus/eslint-plugin-unicorn?branch=master)
Copy link
Owner

Choose a reason for hiding this comment

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

Shouldn't the badge be linkified?


<img src="https://cloud.githubusercontent.com/assets/170270/18659176/1cc373d0-7f33-11e6-890f-0ba35362ee7e.jpg" width="180" align="right">

Expand Down