-
-
Notifications
You must be signed in to change notification settings - Fork 35.4k
build: add GitHub actions to run linters #31323
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
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
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.
- Loading branch information
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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 | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I suggest to use 12.x. It should be faster and will be supported for a longer time.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I deliberately went for the earliest in support version of Node.js on the basis that it would alert us if any of our tooling involved in the linting would break on it and thus help apply As for speed the lint checks are completing in less than 2 minutes which is a fraction of the time taken to run the build jobs.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If we want to have such guarantees, we could even let it run on both versions?
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ideally in the long term when actions/setup-node#26 is addressed we can put an alias in here like |
||
| - 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 | ||
Uh oh!
There was an error while loading. Please reload this page.