mirror of https://github.com/lukechilds/docs.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
38 lines
903 B
38 lines
903 B
5 years ago
|
name: Code quality
|
||
|
on: [push]
|
||
|
|
||
|
jobs:
|
||
|
code_quality:
|
||
|
runs-on: ubuntu-latest
|
||
|
steps:
|
||
|
- name: Checkout
|
||
|
uses: actions/checkout@v2
|
||
|
|
||
|
- name: Set Node Version
|
||
|
uses: actions/setup-node@v1.4.2
|
||
|
with:
|
||
|
node-version: 14
|
||
|
|
||
|
- name: Get yarn cache directory path
|
||
|
id: yarn-cache-dir-path
|
||
|
run: echo "::set-output name=dir::$(yarn cache dir)"
|
||
|
|
||
|
- name: Check Cache
|
||
|
uses: actions/cache@v2
|
||
|
id: yarn-cache
|
||
|
with:
|
||
|
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
|
||
|
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
|
||
|
restore-keys: |
|
||
|
${{ runner.os }}-yarn-
|
||
|
|
||
|
- name: Install deps
|
||
|
run: yarn --frozen-lockfile
|
||
|
if: steps.yarn-cache.outputs.cache-hit != 'true'
|
||
|
|
||
|
- name: Lint
|
||
|
run: yarn lint
|
||
|
|
||
|
- name: Typecheck
|
||
|
run: yarn typecheck
|