|
6 | 6 | branches: [trunk] |
7 | 7 |
|
8 | 8 | jobs: |
9 | | - check: |
10 | | - name: All |
| 9 | + Setup: |
| 10 | + name: Setup for Jobs |
| 11 | + runs-on: ubuntu-latest |
| 12 | + |
| 13 | + steps: |
| 14 | + - uses: actions/checkout@v2 |
| 15 | + - name: Cache node modules |
| 16 | + uses: actions/cache@v2 |
| 17 | + with: |
| 18 | + path: node_modules |
| 19 | + key: ${{ runner.OS }}-build-${{ hashFiles('**/package-lock.json') }} |
| 20 | + restore-keys: | |
| 21 | + ${{ runner.OS }}-build-${{ env.cache-name }}- |
| 22 | + ${{ runner.OS }}-build- |
| 23 | + ${{ runner.OS }}- |
| 24 | + - name: Install Node Dependencies |
| 25 | + run: npm install |
11 | 26 |
|
| 27 | + JSLintingCheck: |
| 28 | + name: Lint JavaScript |
| 29 | + needs: Setup |
12 | 30 | runs-on: ubuntu-latest |
13 | 31 |
|
14 | 32 | steps: |
15 | | - - uses: actions/checkout@v2 |
| 33 | + - uses: actions/checkout@v2 |
| 34 | + - name: Cache node modules |
| 35 | + uses: actions/cache@v2 |
| 36 | + with: |
| 37 | + path: node_modules |
| 38 | + key: ${{ runner.OS }}-build-${{ hashFiles('**/package-lock.json') }} |
| 39 | + restore-keys: | |
| 40 | + ${{ runner.OS }}-build-${{ env.cache-name }}- |
| 41 | + ${{ runner.OS }}-build- |
| 42 | + ${{ runner.OS }}- |
| 43 | + - name: Install Node Dependencies |
| 44 | + run: npm install |
| 45 | + - name: Save Code Linting Report JSON |
| 46 | + run: npm run lint:js:report |
| 47 | + # Continue to the next step even if this fails |
| 48 | + continue-on-error: true |
| 49 | + - name: Upload ESLint report |
| 50 | + uses: actions/upload-artifact@v2 |
| 51 | + with: |
| 52 | + name: eslint_report.json |
| 53 | + path: eslint_report.json |
| 54 | + - name: Annotate Code Linting Results |
| 55 | + |
| 56 | + with: |
| 57 | + repo-token: "${{ secrets.GITHUB_TOKEN }}" |
| 58 | + report-json: "eslint_report.json" |
16 | 59 |
|
17 | | - - name: Cache node modules |
18 | | - uses: actions/cache@v2 |
19 | | - env: |
20 | | - cache-name: cache-node-modules |
21 | | - with: |
22 | | - # npm cache files are stored in `~/.npm` on Linux/macOS |
23 | | - path: ~/.npm |
24 | | - key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} |
25 | | - restore-keys: | |
26 | | - ${{ runner.os }}-build-${{ env.cache-name }}- |
27 | | - ${{ runner.os }}-build- |
28 | | - ${{ runner.os }}- |
29 | | - - name: Use Node.js 12.x |
30 | | - uses: actions/setup-node@v1 |
31 | | - with: |
32 | | - node-version: 12.x |
33 | | - - name: Npm install |
34 | | - run: | |
35 | | - npm install |
36 | | - - name: Lint JavaScript |
37 | | - uses: bradennapier/[email protected] |
38 | | - with: |
39 | | - issueSummaryOnlyOnEvent: true |
40 | | - - name: Lint CSS |
41 | | - run: npm run lint:css |
| 60 | + CSSLintingCheck: |
| 61 | + name: Lint CSS |
| 62 | + needs: Setup |
| 63 | + runs-on: ubuntu-latest |
42 | 64 |
|
| 65 | + steps: |
| 66 | + - uses: actions/checkout@v2 |
| 67 | + - name: Cache node modules |
| 68 | + uses: actions/cache@v2 |
| 69 | + with: |
| 70 | + path: node_modules |
| 71 | + key: ${{ runner.OS }}-build-${{ hashFiles('**/package-lock.json') }} |
| 72 | + restore-keys: | |
| 73 | + ${{ runner.OS }}-build-${{ env.cache-name }}- |
| 74 | + ${{ runner.OS }}-build- |
| 75 | + ${{ runner.OS }}- |
| 76 | + - name: Install Node Dependencies |
| 77 | + run: npm install |
| 78 | + - name: Lint CSS |
| 79 | + run: npm run lint:css |
0 commit comments