-
Notifications
You must be signed in to change notification settings - Fork 71
42 lines (40 loc) · 1.22 KB
/
lint.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
name: Lint
on: [push, pull_request]
jobs:
eslint:
name: Run ESLint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Node.JS 10.x
uses: actions/setup-node@v1
with:
node-version: "10.x"
- name: Cache node modules
uses: actions/cache@v1
with:
path: node_modules
key: ${{ runner.OS }}-build-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.OS }}-build-${{ env.cache-name }}-
${{ runner.OS }}-build-
${{ runner.OS }}-
- name: Install Node Dependencies
run: npm install
env:
CI: TRUE
- name: Test Code Linting
run: npm run eslint:github-action
# Continue to the next step even if this fails
continue-on-error: true
- name: Annotate Code Linting Results
uses: ataylorme/[email protected]
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
report-json: "eslint_report.json"
continue-on-error: true
- name: Upload ESLint report
uses: actions/upload-artifact@v1
with:
name: eslint_report.json
path: eslint_report.json