uniswap-interface-uncensored/.github/workflows/lint.yml

49 lines
1.3 KiB
YAML
Raw Normal View History

2020-09-24 19:18:57 +03:00
name: Lint
on:
push:
branches:
2021-02-03 21:56:02 +03:00
- main
pull_request:
2020-09-24 20:18:40 +03:00
branches:
2021-02-03 21:56:02 +03:00
- main
2020-09-24 19:18:57 +03:00
jobs:
run-linters:
name: Run linters
if: ${{ github.event_name != 'pull_request' || github.event.pull_request.head.repo.owner.login == github.repository_owner }}
2020-09-24 19:18:57 +03:00
runs-on: ubuntu-latest
steps:
- name: Checkout
2020-09-24 19:18:57 +03:00
uses: actions/checkout@v2
- name: Set up node
uses: actions/setup-node@v2
2020-09-24 19:18:57 +03:00
with:
node-version: 14
2020-09-24 19:18:57 +03:00
registry-url: https://registry.npmjs.org
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v2
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
2020-09-24 19:18:57 +03:00
- name: Install dependencies
run: yarn install --frozen-lockfile
2020-09-24 19:18:57 +03:00
- name: Run linters
uses: wearerequired/lint-action@36c7e6689e80d785d27a22f71d970f3a3b4fcb70
2020-09-24 19:18:57 +03:00
with:
github_token: ${{ secrets.github_token }}
eslint: true
eslint_extensions: js,jsx,ts,tsx,json
auto_fix: true