-
Notifications
You must be signed in to change notification settings - Fork 46
54 lines (44 loc) · 1.45 KB
/
typecheck-lint.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
48
49
50
51
52
53
54
name: Typecheck and Lint
on: [push]
jobs:
typecheck-and-lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 18.x
- name: Enable Corepack and Use Correct Yarn Version
run: |
corepack enable
corepack prepare yarn@4.7.0 --activate
- name: Restore dependencies
id: yarn-cache
uses: actions/cache/restore@v4
with:
path: |
**/node_modules
.yarn/install-state.gz
key: ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }}-${{ hashFiles('**/package.json', '!node_modules/**') }}
restore-keys: |
${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }}
${{ runner.os }}-yarn-
- name: Debug Yarn State (Optional)
run: yarn install --check-cache
- name: Install dependencies
if: steps.yarn-cache.outputs.cache-hit != 'true'
run: yarn install --immutable
shell: bash
- name: Cache dependencies
if: steps.yarn-cache.outputs.cache-hit != 'true'
uses: actions/cache/save@v4
with:
path: |
**/node_modules
.yarn/install-state.gz
key: ${{ steps.yarn-cache.outputs.cache-primary-key }}
- name: Run Eslint Checks
run: yarn lint
- name: Run Typescript Checks
run: yarn typescript