-
-
Notifications
You must be signed in to change notification settings - Fork 19
47 lines (45 loc) · 1.32 KB
/
linting.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
name: Code Quality Check
on:
workflow_dispatch:
pull_request:
paths:
- 'templates/vanilla/**'
push:
branches:
- main
paths:
- 'templates/vanilla/**'
jobs:
linting:
name: Linting (eslint, prettier, tsc)
timeout-minutes: 15
runs-on: ubuntu-latest
steps:
- uses: styfle/[email protected]
- uses: actions/checkout@v3
with:
fetch-depth: 1
submodules: recursive
- uses: actions/setup-node@v3
with:
node-version: 16
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: cd templates/vanilla/template && echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v3
name: Yarn Cache
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/package.json') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Yarn Install
uses: nick-invision/[email protected]
with:
timeout_minutes: 3
retry_wait_seconds: 30
max_attempts: 3
command: cd templates/vanilla/template && rm -rf patches && yarn --no-audit --prefer-offline
- name: Lint
run: cd templates/vanilla/template && yarn lint:all