mirror of
https://github.com/nodejs/node.git
synced 2025-08-15 13:48:44 +02:00

PR-URL: https://github.com/nodejs/node/pull/36118 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
87 lines
2.3 KiB
YAML
87 lines
2.3 KiB
YAML
name: linters
|
|
|
|
on:
|
|
pull_request:
|
|
push:
|
|
branches:
|
|
- master
|
|
- v[0-9]+.x-staging
|
|
- v[0-9]+.x
|
|
|
|
env:
|
|
PYTHON_VERSION: 3.9
|
|
NODE_VERSION: 14.x
|
|
|
|
jobs:
|
|
lint-addon-docs:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- name: Use Node.js ${{ env.NODE_VERSION }}
|
|
uses: actions/setup-node@v1
|
|
with:
|
|
node-version: ${{ env.NODE_VERSION }}
|
|
- name: Environment Information
|
|
run: npx envinfo
|
|
- name: Lint addon docs
|
|
run: NODE=$(command -v node) make lint-addon-docs
|
|
lint-cpp:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- name: Set up Python ${{ env.PYTHON_VERSION }}
|
|
uses: actions/setup-python@v2
|
|
with:
|
|
python-version: ${{ env.PYTHON_VERSION }}
|
|
- name: Environment Information
|
|
run: npx envinfo
|
|
- name: Lint C/C++ files
|
|
run: make lint-cpp
|
|
lint-md:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- name: Use Node.js ${{ env.NODE_VERSION }}
|
|
uses: actions/setup-node@v1
|
|
with:
|
|
node-version: ${{ env.NODE_VERSION }}
|
|
- name: Environment Information
|
|
run: npx envinfo
|
|
- name: Lint docs
|
|
run: |
|
|
echo "::add-matcher::.github/workflows/remark-lint-problem-matcher.json"
|
|
NODE=$(command -v node) make lint-md
|
|
lint-js:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- name: Use Node.js ${{ env.NODE_VERSION }}
|
|
uses: actions/setup-node@v1
|
|
with:
|
|
node-version: ${{ env.NODE_VERSION }}
|
|
- name: Environment Information
|
|
run: npx envinfo
|
|
- name: Lint JavaScript files
|
|
run: NODE=$(command -v node) make lint-js
|
|
lint-py:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- name: Set up Python ${{ env.PYTHON_VERSION }}
|
|
uses: actions/setup-python@v2
|
|
with:
|
|
python-version: ${{ env.PYTHON_VERSION }}
|
|
- name: Environment Information
|
|
run: npx envinfo
|
|
- name: Lint Python
|
|
run: |
|
|
make lint-py-build || true
|
|
NODE=$(command -v node) make lint-py
|
|
|
|
lint-codeowners:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: mszostok/codeowners-validator@v0.4.0
|
|
with:
|
|
checks: "files,duppatterns"
|