|
| 1 | +name: linters |
| 2 | + |
| 3 | +on: [push, pull_request] |
| 4 | + |
| 5 | +env: |
| 6 | + PYTHON_VERSION: 3.8 |
| 7 | + NODE_VERSION: 10.x |
| 8 | + |
| 9 | +jobs: |
| 10 | + lint-addon-docs: |
| 11 | + runs-on: ubuntu-latest |
| 12 | + steps: |
| 13 | + - uses: actions/checkout@v2 |
| 14 | + - name: Use Node.js ${{ env.NODE_VERSION }} |
| 15 | + uses: actions/setup-node@v1 |
| 16 | + with: |
| 17 | + node-version: ${{ env.NODE_VERSION }} |
| 18 | + - name: Environment Information |
| 19 | + run: npx envinfo |
| 20 | + - name: Lint addon docs |
| 21 | + run: NODE=$(which node) make lint-addon-docs |
| 22 | + lint-cpp: |
| 23 | + runs-on: ubuntu-latest |
| 24 | + steps: |
| 25 | + - uses: actions/checkout@v2 |
| 26 | + - name: Set up Python ${{ env.PYTHON_VERSION }} |
| 27 | + uses: actions/setup-python@v1 |
| 28 | + with: |
| 29 | + PYTHON_VERSION: ${{ env.PYTHON_VERSION }} |
| 30 | + - name: Environment Information |
| 31 | + run: npx envinfo |
| 32 | + - name: Lint C/C++ files |
| 33 | + run: make lint-cpp |
| 34 | + lint-md: |
| 35 | + runs-on: ubuntu-latest |
| 36 | + steps: |
| 37 | + - uses: actions/checkout@v2 |
| 38 | + - name: Use Node.js ${{ env.NODE_VERSION }} |
| 39 | + uses: actions/setup-node@v1 |
| 40 | + with: |
| 41 | + node-version: ${{ env.NODE_VERSION }} |
| 42 | + - name: Environment Information |
| 43 | + run: npx envinfo |
| 44 | + - name: Lint docs |
| 45 | + run: | |
| 46 | + echo "::add-matcher::.github/workflows/remark-lint-problem-matcher.json" |
| 47 | + NODE=$(which node) make lint-md |
| 48 | + lint-js: |
| 49 | + runs-on: ubuntu-latest |
| 50 | + steps: |
| 51 | + - uses: actions/checkout@v2 |
| 52 | + - name: Use Node.js ${{ env.NODE_VERSION }} |
| 53 | + uses: actions/setup-node@v1 |
| 54 | + with: |
| 55 | + node-version: ${{ env.NODE_VERSION }} |
| 56 | + - name: Environment Information |
| 57 | + run: npx envinfo |
| 58 | + - name: Lint JavaScript files |
| 59 | + run: NODE=$(which node) make lint-js |
| 60 | + lint-py: |
| 61 | + runs-on: ubuntu-latest |
| 62 | + steps: |
| 63 | + - uses: actions/checkout@v2 |
| 64 | + - name: Set up Python ${{ env.PYTHON_VERSION }} |
| 65 | + uses: actions/setup-python@v1 |
| 66 | + with: |
| 67 | + PYTHON_VERSION: ${{ env.PYTHON_VERSION }} |
| 68 | + - name: Environment Information |
| 69 | + run: npx envinfo |
| 70 | + - name: Lint Python |
| 71 | + run: | |
| 72 | + make lint-py-build || true |
| 73 | + NODE=$(which node) make lint lint-py |
0 commit comments