Skip to content

Commit 8743976

Browse files
committed
update GH action
1 parent e11aba9 commit 8743976

File tree

2 files changed

+43
-18
lines changed

2 files changed

+43
-18
lines changed

.github/action/setup.yml

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: 'Setup Action'
2+
description: 'Checkouts the repo, sets up node and installs dependencies'
3+
4+
on:
5+
workflow_call:
6+
7+
jobs:
8+
setup:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Checkout Repository
12+
uses: actions/checkout@v4
13+
14+
- name: Set up Node.js
15+
uses: actions/setup-node@v4
16+
with:
17+
node-version: '22'
18+
19+
- name: Cache dependencies
20+
id: cache
21+
uses: actions/cache@v4
22+
with:
23+
path: ./node_modules
24+
key: modules-${{ hashFiles('package-lock.json') }}
25+
26+
- name: Install dependencies
27+
if: steps.cache.outputs.cache-hit != 'true'
28+
run: npm ci

.github/workflows/static-checks.yml

+15-18
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,38 @@
1-
name: Static Checks
1+
name: "Static Checks"
2+
23
on:
3-
workflow_call:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- "**"
10+
411
jobs:
512
setup:
6-
name: Setup Node.js
7-
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v2
8-
with:
9-
node-version: '22'
13+
name: Setup Dependencies
14+
uses: ./.github/action/setup.yml
1015

1116
lint:
1217
name: ESLint Check
1318
runs-on: ubuntu-latest
19+
needs: setup
1420
steps:
15-
- name: Checkout Repository
16-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
17-
18-
- name: Run linter
21+
- name: Run Linter
1922
run: npm run lint
2023

2124
tsc:
2225
name: TS Types Check
2326
runs-on: ubuntu-latest
27+
needs: setup
2428
steps:
25-
- name: Checkout Repository
26-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
27-
2829
- name: Run Tsc
2930
run: npm run type-check
3031

3132
build:
3233
name: Build App Check
3334
runs-on: ubuntu-latest
34-
env:
35-
NODE_OPTIONS: "--max_old_space_size=4096"
35+
needs: setup
3636
steps:
37-
- name: Checkout Repository
38-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
39-
4037
- name: Build App
4138
run: npm run build

0 commit comments

Comments
 (0)