-
Notifications
You must be signed in to change notification settings - Fork 370
60 lines (47 loc) · 1.47 KB
/
type-check.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
55
56
57
58
59
60
name: Type Check
on:
pull_request:
branches: [main]
merge_group:
workflow_dispatch:
jobs:
type-check:
runs-on: ${{ fromJSON(vars.SELF_LINUX_LABELS || '"ubuntu-latest"') }}
steps:
- name: Print runner context
env:
RUNNER_CONTEXT: ${{ toJson(runner) }}
run: echo "$RUNNER_CONTEXT"
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 1
- name: Install Pnpm
uses: pnpm/action-setup@v2
- name: Setup Node.js 18
uses: actions/setup-node@v3
with:
node-version: 18
cache: 'pnpm'
- name: Check skip CI
run: echo "RESULT=$(node ./scripts/skipCI.js)" >> "$GITHUB_OUTPUT"
id: skip-ci
- name: Log skip CI result
run: echo "${{steps.skip-ci.outputs.RESULT}}"
- name: Nx Cache
id: nx-cache
if: ${{steps.skip-ci.outputs.RESULT != 'true'}}
uses: actions/cache@v3
with:
path: .nx-cache
key: nx-${{ github.base_ref }}-${{ github.ref_name }}-${{ github.sha }}
restore-keys: |
nx-${{ github.base_ref }}-${{ github.ref_name }}-
nx-${{ github.base_ref }}-
nx-
- name: Install Dependencies
if: ${{steps.skip-ci.outputs.RESULT != 'true'}}
run: pnpm install --ignore-scripts --frozen-lockfile
- name: Type Check
if: ${{steps.skip-ci.outputs.RESULT != 'true'}}
run: pnpm run prepare