| name: linters |
| |
| on: [push, pull_request] |
| |
| env: |
| PYTHON_VERSION: 3.8 |
| NODE_VERSION: 10.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=$(which 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@v1 |
| 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=$(which 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=$(which 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@v1 |
| with: |
| PYTHON_VERSION: ${{ env.PYTHON_VERSION }} |
| - name: Environment Information |
| run: npx envinfo |
| - name: Lint Python |
| run: | |
| make lint-py-build || true |
| NODE=$(which node) make lint lint-py |