Skip to content

Commit

Permalink
Create lint.yml (Github Action)
Browse files Browse the repository at this point in the history
  • Loading branch information
daniel-sm-yu committed Oct 12, 2021
1 parent ec9db2e commit 0232186
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Lint Code Base

on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:

jobs:
run-lint:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"

- name: Cache node_modules
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-
- name: Install dependencies
run: yarn --cwd ./frontend/ && yarn --cwd ./backend

- name: Lint Frontend
working-directory: ./frontend
run: yarn lint

- name: Lint Backend
working-directory: ./backend
run: yarn lint

0 comments on commit 0232186

Please sign in to comment.