-
Notifications
You must be signed in to change notification settings - Fork 1
executable file
·50 lines (43 loc) · 1.25 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
43
44
45
46
47
48
49
50
name: Lint
on:
pull_request_target:
branches:
- main
jobs:
lint:
strategy:
matrix:
node: ["14.x"]
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout repo
uses: actions/checkout@v2
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 2
- name: Use Node.js 14.x
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node }}
# cache: "yarn"
# cache-dependency-path: yarn.lock
- name: Install deps
if: steps.yarn-cache.outputs.cache-hit != 'true'
run: yarn
- name: Lint
run: yarn lint
continue-on-error: false
- name: Merge lint reports
run: jq -s '[.[]]|flatten' reports/lint-results/*.json &> reports/lint-results/eslint_report.json
- name: Annotate Code Linting Results
uses: ataylorme/[email protected]
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
report-json: "reports/lint-results/eslint_report.json"
- name: Upload ESLint report
if: ${{ always() }}
uses: actions/upload-artifact@v2
with:
name: lint-results
path: lint-results