Skip to content

Commit d190ee0

Browse files
richardlauMylesBorins
authored andcommitted
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. Backport-PR-URL: #32608 PR-URL: #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>
1 parent 782f5db commit d190ee0

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

.github/workflows/CI.yml

+36
Original file line numberDiff line numberDiff line change
@@ -41,3 +41,39 @@ jobs:
4141
run: npx envinfo
4242
- name: Build
4343
run: ./configure && make -j8
44+
lint-addon-docs:
45+
runs-on: ubuntu-latest
46+
steps:
47+
- uses: actions/checkout@v2
48+
- name: Use Node.js ${{ matrix.node-version }}
49+
uses: actions/setup-node@v1
50+
with:
51+
node-version: 10.x
52+
- name: Lint addon docs
53+
run: NODE=$(which node) make lint-addon-docs
54+
lint-cpp:
55+
runs-on: ubuntu-latest
56+
steps:
57+
- uses: actions/checkout@v2
58+
- name: Lint C/C++ files
59+
run: make lint-cpp
60+
lint-md:
61+
runs-on: ubuntu-latest
62+
steps:
63+
- uses: actions/checkout@v2
64+
- name: Use Node.js ${{ matrix.node-version }}
65+
uses: actions/setup-node@v1
66+
with:
67+
node-version: 10.x
68+
- name: Lint docs
69+
run: NODE=$(which node) make lint-md
70+
lint-js:
71+
runs-on: ubuntu-latest
72+
steps:
73+
- uses: actions/checkout@v2
74+
- name: Use Node.js ${{ matrix.node-version }}
75+
uses: actions/setup-node@v1
76+
with:
77+
node-version: 10.x
78+
- name: Lint JavaScript files
79+
run: NODE=$(which node) make lint-js

0 commit comments

Comments
 (0)