Skip to content

Commit 346f5ce

Browse files
committed
refactor(github/workflow): use javascript-project-setup reusable workflow
1 parent 8ff98c9 commit 346f5ce

File tree

1 file changed

+8
-29
lines changed

1 file changed

+8
-29
lines changed

.github/workflows/build-lint-test.yaml

+8-29
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ on:
1212
- next
1313

1414
env:
15-
NODE_VERSION: lts/*
15+
NODE_VERSION: 22.11.0
1616

1717
jobs:
1818
main:
@@ -23,46 +23,25 @@ jobs:
2323
contents: read
2424

2525
steps:
26-
- name: ⤵️ Checkout repository
27-
uses: actions/checkout@v4
28-
29-
- name: 🏗 Setup nodejs
30-
uses: actions/setup-node@v4
31-
with:
32-
node-version: ${{ env.NODE_VERSION }}
33-
34-
- name: 🏗 Setup nodejs corepack
35-
run: corepack enable
36-
37-
- name: 🏗 Get yarn config
38-
id: yarn_config
39-
run: echo "cache_folder=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT
40-
41-
- name: 🏗 Cache Layer
42-
uses: actions/cache@v4
26+
- name: 🛠️ JavaScript Project Setup
27+
uses: the-nexim/actions/.github/workflows/javascript-project-setup.yaml@next
4328
with:
44-
path: ${{ steps.yarn_config.outputs.cache_folder }}
45-
key: ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }}
46-
restore-keys: |
47-
${{ runner.os }}-yarn-
48-
49-
- name: 🏗 Install dependencies
50-
run: yarn install --immutable
29+
node_version: ${{ env.NODE_VERSION }}
5130

52-
- name: 🏗 Cache Wireit
31+
- name: 📦 Cache Wireit
5332
uses: google/wireit@setup-github-actions-caching/v2
5433

55-
- name: 🚀 Build Typescript
34+
- name: 🏗️ Build Typescript
5635
run: yarn build
5736
env:
5837
WIREIT_LOGGER: metrics
5938

60-
- name: 🚀 Run ESLint
39+
- name: 🧹 Run ESLint
6140
run: yarn lint
6241
env:
6342
WIREIT_LOGGER: metrics
6443

65-
- name: 🚀 Run Test
44+
- name: 🧪 Run Test
6645
run: yarn test
6746
env:
6847
WIREIT_LOGGER: metrics

0 commit comments

Comments
 (0)