Skip to content

Commit

Permalink
add linting gh action
Browse files Browse the repository at this point in the history
  • Loading branch information
wise-king-sullyman committed Nov 2, 2022
1 parent 551d18e commit ee5121b
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,39 @@ jobs:
- name: Build dist
run: yarn build
if: steps.dist.outputs.cache-hit != 'true'
lint:
runs-on: ubuntu-latest
env:
GH_PR_NUM: ${{ github.event.number }}
needs: build
steps:
- uses: actions/checkout@v2
- run: |
if [[ ! -z "${GH_PR_NUM}" ]]; then
echo "Checking out PR"
git fetch origin pull/$GH_PR_NUM/head:tmp
git checkout tmp
fi
- uses: actions/setup-node@v1
with:
node-version: '14'
- uses: actions/cache@v2
id: yarn-cache
name: Cache npm deps
with:
path: |
node_modules
**/node_modules
key: ${{ runner.os }}-yarn-14-${{ secrets.CACHE_VERSION }}-${{ hashFiles('yarn.lock') }}
- run: yarn install --frozen-lockfile
if: steps.yarn-cache.outputs.cache-hit != 'true'
- uses: actions/cache@v2
id: lint-cache
name: Load lint cache
with:
path: '.eslintcache'
key: ${{ runner.os }}-lint-14-${{ secrets.CACHE_VERSION }}-${{ hashFiles('yarn.lock') }}
- name: ESLint
run: yarn lint:js
- name: MDLint
run: yarn lint:md

0 comments on commit ee5121b

Please sign in to comment.