2022-04-06 01:06:34 -05:00
|
|
|
name: Upload Annotations
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches: [master]
|
|
|
|
pull_request:
|
|
|
|
branches: [master]
|
|
|
|
|
2022-06-17 10:58:29 -05:00
|
|
|
concurrency:
|
2023-01-18 22:22:17 -05:00
|
|
|
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
|
2022-06-17 10:58:29 -05:00
|
|
|
cancel-in-progress: true
|
|
|
|
|
2022-04-06 01:06:34 -05:00
|
|
|
jobs:
|
|
|
|
upload-annotations:
|
2022-07-22 01:18:05 -05:00
|
|
|
# avoid out of memory issue since macOS has bigger memory
|
|
|
|
# https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners#supported-runners-and-hardware-resources
|
|
|
|
runs-on: macos-latest
|
2022-08-12 10:29:19 -05:00
|
|
|
# fork repos need to opt out
|
|
|
|
if: github.event.pull_request.head.repo.full_name == github.repository
|
2022-07-20 04:29:07 -05:00
|
|
|
|
2022-04-06 01:06:34 -05:00
|
|
|
steps:
|
2022-04-22 04:13:21 -05:00
|
|
|
- uses: actions/checkout@v3
|
2022-04-06 01:06:34 -05:00
|
|
|
|
|
|
|
- name: Setup Node and pnpm
|
2022-10-16 23:07:50 -05:00
|
|
|
uses: silverhand-io/actions-node-pnpm-run-steps@v2
|
2022-04-06 01:06:34 -05:00
|
|
|
|
|
|
|
- name: Prepack
|
|
|
|
run: pnpm prepack
|
|
|
|
|
|
|
|
- name: Lint with Report
|
2022-11-10 23:58:27 -05:00
|
|
|
run: pnpm -r --parallel lint:report && node .scripts/merge-eslint-reports.js
|
2022-04-06 01:06:34 -05:00
|
|
|
|
|
|
|
- name: Annotate Code Linting Results
|
|
|
|
uses: ataylorme/eslint-annotate-action@1.2.0
|
|
|
|
with:
|
|
|
|
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
|
|
|
|
- name: Upload ESLint report
|
2022-04-22 04:13:31 -05:00
|
|
|
uses: actions/upload-artifact@v3
|
2022-04-06 01:06:34 -05:00
|
|
|
with:
|
|
|
|
name: eslint_report.json
|
|
|
|
path: eslint_report.json
|