|
| 1 | +name: Lint |
| 2 | + |
| 3 | +concurrency: |
| 4 | + group: wf-${{github.event.pull_request.number || github.sha}}-${{github.workflow}} |
| 5 | + cancel-in-progress: true |
| 6 | + |
| 7 | +on: |
| 8 | + pull_request: |
| 9 | + push: |
| 10 | + branches: |
| 11 | + - "[0-9][0-9].[0-9].[0-9]*" |
| 12 | + |
| 13 | +jobs: |
| 14 | + Angular: |
| 15 | + runs-on: ubuntu-latest |
| 16 | + timeout-minutes: 60 |
| 17 | + steps: |
| 18 | + - name: Get sources |
| 19 | + uses: actions/checkout@v3 |
| 20 | + |
| 21 | + - name: Use Node.js |
| 22 | + uses: actions/setup-node@v3 |
| 23 | + |
| 24 | + - name: Restore npm cache |
| 25 | + uses: actions/cache@v3 |
| 26 | + with: |
| 27 | + path: ./Angular/node_modules |
| 28 | + key: ${{ runner.os }}-node-modules-${{ hashFiles('**/package-lock.json') }} |
| 29 | + restore-keys: ${{ runner.os }}-node-modules |
| 30 | + |
| 31 | + - name: Run npm install |
| 32 | + working-directory: Angular |
| 33 | + run: npm install --no-audit --no-fund |
| 34 | + |
| 35 | + - name: Lint Angular |
| 36 | + working-directory: Angular |
| 37 | + env: |
| 38 | + DEBUG: eslint:cli-engine |
| 39 | + run: npm run lint |
| 40 | + |
| 41 | + jQuery: |
| 42 | + runs-on: ubuntu-latest |
| 43 | + timeout-minutes: 60 |
| 44 | + steps: |
| 45 | + - name: Get sources |
| 46 | + uses: actions/checkout@v3 |
| 47 | + |
| 48 | + - name: Use Node.js |
| 49 | + uses: actions/setup-node@v3 |
| 50 | + |
| 51 | + - name: Restore npm cache |
| 52 | + uses: actions/cache@v3 |
| 53 | + with: |
| 54 | + path: ./jQuery/node_modules |
| 55 | + key: ${{ runner.os }}-node-modules-${{ hashFiles('**/package-lock.json') }} |
| 56 | + restore-keys: ${{ runner.os }}-node-modules |
| 57 | + |
| 58 | + - name: Run npm install |
| 59 | + working-directory: jQuery |
| 60 | + run: npm install --no-audit --no-fund |
| 61 | + |
| 62 | + - name: Lint jQuery |
| 63 | + working-directory: jQuery |
| 64 | + env: |
| 65 | + DEBUG: eslint:cli-engine |
| 66 | + run: npm run lint |
| 67 | + |
| 68 | + React: |
| 69 | + runs-on: ubuntu-latest |
| 70 | + timeout-minutes: 60 |
| 71 | + steps: |
| 72 | + - name: Get sources |
| 73 | + uses: actions/checkout@v3 |
| 74 | + |
| 75 | + - name: Use Node.js |
| 76 | + uses: actions/setup-node@v4 |
| 77 | + with: |
| 78 | + node-version: '20' |
| 79 | + |
| 80 | + - name: Restore npm cache |
| 81 | + uses: actions/cache@v3 |
| 82 | + with: |
| 83 | + path: ./React/node_modules |
| 84 | + key: ${{ runner.os }}-node-modules-${{ hashFiles('**/package-lock.json') }} |
| 85 | + restore-keys: ${{ runner.os }}-node-modules |
| 86 | + |
| 87 | + - name: Run npm install |
| 88 | + working-directory: React |
| 89 | + run: npm install --no-audit --no-fund |
| 90 | + |
| 91 | + - name: Lint React |
| 92 | + working-directory: React |
| 93 | + env: |
| 94 | + DEBUG: eslint:cli-engine |
| 95 | + run: npm run lint |
| 96 | + |
| 97 | + Vue: |
| 98 | + runs-on: ubuntu-latest |
| 99 | + timeout-minutes: 60 |
| 100 | + steps: |
| 101 | + - name: Get sources |
| 102 | + uses: actions/checkout@v3 |
| 103 | + |
| 104 | + - name: Use Node.js |
| 105 | + uses: actions/setup-node@v3 |
| 106 | + |
| 107 | + - name: Restore npm cache |
| 108 | + uses: actions/cache@v3 |
| 109 | + with: |
| 110 | + path: ./Vue/node_modules |
| 111 | + key: ${{ runner.os }}-node-modules-${{ hashFiles('**/package-lock.json') }} |
| 112 | + restore-keys: ${{ runner.os }}-node-modules |
| 113 | + |
| 114 | + - name: Run npm install |
| 115 | + working-directory: Vue |
| 116 | + run: npm install --no-audit --no-fund |
| 117 | + |
| 118 | + - name: Lint Vue |
| 119 | + working-directory: Vue |
| 120 | + env: |
| 121 | + DEBUG: eslint:cli-engine |
| 122 | + run: npm run lint |
0 commit comments