32 lines
881 B
YAML
32 lines
881 B
YAML
name: Lint
|
|
on:
|
|
workflow_call:
|
|
jobs:
|
|
lint:
|
|
runs-on: buildjet-4vcpu-ubuntu-2204
|
|
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- uses: ./.github/actions/dangerous-git-checkout
|
|
- uses: ./.github/actions/yarn-install
|
|
- name: Run Linting with Reports
|
|
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
|
|
uses: ataylorme/eslint-annotate-action@v2
|
|
with:
|
|
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
|
report-json: "lint-results/eslint_report.json"
|
|
only-pr-files: false
|
|
|
|
- name: Upload ESLint report
|
|
if: ${{ always() }}
|
|
uses: actions/upload-artifact@v2
|
|
with:
|
|
name: lint-results
|
|
path: lint-results
|