32 lines
869 B
YAML
32 lines
869 B
YAML
name: Lint
|
|
on:
|
|
workflow_call:
|
|
jobs:
|
|
lint:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- uses: ./.github/actions/dangerous-git-checkout
|
|
- uses: ./.github/actions/yarn-install
|
|
- name: Save Code Linting 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
|