Skip to content

Commit 0411a49

Browse files
committed
refactor(github/workflow): use javascript-project-setup reusable work… (#3)
refactor(github/workflow): use javascript-project-setup reusable workflow
1 parent 8ff98c9 commit 0411a49

File tree

1 file changed

+15
-34
lines changed

1 file changed

+15
-34
lines changed

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

+15-34
Original file line numberDiff line numberDiff line change
@@ -12,57 +12,38 @@ on:
1212
- next
1313

1414
env:
15-
NODE_VERSION: lts/*
15+
NODE_VERSION: 22.11.0
16+
17+
18+
permissions:
19+
actions: read
20+
contents: read
1621

1722
jobs:
23+
setup:
24+
uses: the-nexim/actions/.github/workflows/javascript-project-setup.yaml@next
25+
with:
26+
node_version: ${{ env.NODE_VERSION }}
27+
1828
main:
1929
name: Build & Lint & Test
2030
runs-on: ubuntu-latest
2131

22-
permissions:
23-
contents: read
24-
2532
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
43-
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
51-
52-
- name: 🏗 Cache Wireit
33+
- name: 📦 Cache Wireit
5334
uses: google/wireit@setup-github-actions-caching/v2
5435

55-
- name: 🚀 Build Typescript
36+
- name: 🏗️ Build Typescript
5637
run: yarn build
5738
env:
5839
WIREIT_LOGGER: metrics
5940

60-
- name: 🚀 Run ESLint
41+
- name: 🧹 Run ESLint
6142
run: yarn lint
6243
env:
6344
WIREIT_LOGGER: metrics
6445

65-
- name: 🚀 Run Test
46+
- name: 🧪 Run Test
6647
run: yarn test
6748
env:
6849
WIREIT_LOGGER: metrics

0 commit comments

Comments
 (0)