-
Notifications
You must be signed in to change notification settings - Fork 2
42 lines (33 loc) · 1.15 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:
workflow_call:
jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: 📥 Checkout
uses: actions/checkout@v4
- name: 📥 Checkout PR
uses: goat-community/.github/.github/actions/pr-git-checkout@main
- name: 📥 Monorepo install
uses: goat-community/.github/.github/actions/pnpm-install@main
with:
enable-corepack: true
cwd: ${{ github.workspace }}
- name: 🔬 Run Linting with Reports
run: pnpm run lint:report
continue-on-error: true
- name: 🔬 Merge lint reports
run: jq -s '[.[]]|flatten' lint-results/*.json &> lint-results/eslint_report.json
- name: 🔬 Annotate Code Linting Results
uses: ataylorme/eslint-annotate-action@v2
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
report-json: ${{ github.workspace }}/lint-results/eslint_report.json
only-pr-files: false
- name: 🔬 Upload ESLint report
if: ${{ always() }}
uses: actions/upload-artifact@v3
with:
name: lint-results
path: ${{ github.workspace }}/lint-results