otl http exporter setup #173
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Lint | |
on: | |
pull_request: | |
branches: | |
- main | |
paths: | |
- "**.tsx?" | |
- "**.jsx?" | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
cancel-in-progress: true | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v2 | |
with: | |
ref: ${{ github.event.pull_request.head.sha }} | |
fetch-depth: 2 | |
- name: Use Node 18.x | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18.x | |
cache: "yarn" | |
- name: Install deps | |
if: steps.yarn-cache.outputs.cache-hit != 'true' | |
run: yarn --frozen-lockfile | |
- name: Test Code Linting | |
run: yarn lint | |
- 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 |