2021-08-19 12:27:01 +00:00
|
|
|
name: Lint
|
2022-01-13 18:09:37 +00:00
|
|
|
on:
|
2023-02-21 03:26:38 +00:00
|
|
|
workflow_call:
|
2021-08-19 12:27:01 +00:00
|
|
|
jobs:
|
|
|
|
lint:
|
2023-02-21 23:09:20 +00:00
|
|
|
runs-on: buildjet-4vcpu-ubuntu-2204
|
2021-08-19 12:27:01 +00:00
|
|
|
|
|
|
|
steps:
|
2023-02-21 19:46:17 +00:00
|
|
|
- uses: actions/checkout@v3
|
2023-02-21 03:26:38 +00:00
|
|
|
- uses: ./.github/actions/dangerous-git-checkout
|
|
|
|
- uses: ./.github/actions/yarn-install
|
2022-11-07 21:12:12 +00:00
|
|
|
- name: Save Code Linting Reports
|
2022-03-09 17:52:48 +00:00
|
|
|
run: yarn 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
|
2022-07-12 20:15:06 +00:00
|
|
|
uses: ataylorme/eslint-annotate-action@v2
|
2022-03-09 17:52:48 +00:00
|
|
|
with:
|
2022-07-12 20:05:15 +00:00
|
|
|
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
2022-03-09 17:52:48 +00:00
|
|
|
report-json: "lint-results/eslint_report.json"
|
2022-07-12 20:05:15 +00:00
|
|
|
only-pr-files: false
|
2022-03-09 17:52:48 +00:00
|
|
|
|
|
|
|
- name: Upload ESLint report
|
|
|
|
if: ${{ always() }}
|
|
|
|
uses: actions/upload-artifact@v2
|
|
|
|
with:
|
|
|
|
name: lint-results
|
|
|
|
path: lint-results
|