mirror of
https://github.com/nodejs/node.git
synced 2026-11-27 17:52:27 -05:00
build: add GitHub actions to run linters
Add jobs to our GitHub Actions workflow to run our various lint Makefile targets. The `setup-node` action used to run the JavaScript linter contains problem matchers for eslint that will annotate the files in a pull request if there are failures. PR-URL: https://github.com/nodejs/node/pull/31323 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Jiawen Geng <technicalcute@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
This commit is contained in:
1 parent
bb9622ba5a
commit
0379c319fd
1 file changed
+36
@@ -41,3 +41,39 @@ jobs:
|
||||
run: npx envinfo
|
||||
- name: Build
|
||||
run: ./configure && make -j8
|
||||
lint-addon-docs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Use Node.js ${{ matrix.node-version }}
|
||||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: 10.x
|
||||
- name: Lint addon docs
|
||||
run: NODE=$(which node) make lint-addon-docs
|
||||
lint-cpp:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Lint C/C++ files
|
||||
run: make lint-cpp
|
||||
lint-md:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Use Node.js ${{ matrix.node-version }}
|
||||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: 10.x
|
||||
- name: Lint docs
|
||||
run: NODE=$(which node) make lint-md
|
||||
lint-js:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Use Node.js ${{ matrix.node-version }}
|
||||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: 10.x
|
||||
- name: Lint JavaScript files
|
||||
run: NODE=$(which node) make lint-js
|
||||
Reference in new issue
Block a user