Skip to content

Commit aff4d49

Browse files
committed
fix: update deployment workflow only for lint
1 parent 6306602 commit aff4d49

1 file changed

Lines changed: 55 additions & 37 deletions

File tree

.github/workflows/deployment.yml

Lines changed: 55 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -2,70 +2,88 @@ name: Deployment
22
on:
33
push:
44
branches: [main, dev]
5-
pull_request:
6-
branches: ['**']
75

86
env:
9-
NODE_VERSION: '22'
10-
PNPM_VERSION: '10'
7+
NODE_VERSION: '22.16.0'
8+
PNPM_VERSION: '10.8.1'
119

1210
jobs:
1311
setup:
1412
name: 🏗️ Setup
1513
runs-on: ubuntu-latest
14+
timeout-minutes: 10
1615
outputs:
17-
pnpm_store_path: ${{ steps.pnpm-cache.outputs.pnpm_cache_path }}
16+
pnpm_store_path: ${{ steps.pnpm-store.outputs.pnpm_store_path }}
1817
steps:
1918
- name: ⬇️ Checkout code
2019
uses: actions/checkout@v4
20+
21+
- name: ⚙️ Install pnpm
22+
uses: pnpm/action-setup@v4
23+
with:
24+
version: ${{ env.PNPM_VERSION }}
25+
2126
- name: ⚙️ Setup Node.js
2227
uses: actions/setup-node@v4
2328
with:
2429
node-version: ${{ env.NODE_VERSION }}
2530
cache: 'pnpm'
26-
- name: ⚙️ Install pnpm
27-
uses: pnpm/action-setup@v4
28-
with:
29-
version: ${{ env.PNPM_VERSION }}
31+
32+
- name: 📦 Get pnpm store path
33+
id: pnpm-store
34+
run: |
35+
pnpm_store=$(pnpm store path)
36+
mkdir -p $pnpm_store
37+
echo "pnpm_store_path=$pnpm_store" >> $GITHUB_OUTPUT
38+
3039
- name: 📦 Cache pnpm store
31-
id: pnpm-cache
3240
uses: actions/cache@v4
3341
with:
34-
path: ~/.pnpm-store
42+
path: ${{ steps.pnpm-store.outputs.pnpm_store_path }}
3543
key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }}
3644
restore-keys: |
3745
${{ runner.os }}-pnpm-
46+
47+
- name: 📦 Upload workspace
48+
uses: actions/upload-artifact@v4
49+
with:
50+
name: project-workspace
51+
path: .
52+
3853
lint:
3954
name: 🧹 Lint
4055
runs-on: ubuntu-latest
56+
timeout-minutes: 10
4157
needs: setup
4258
steps:
43-
- name: ⬇️ Checkout code
44-
uses: actions/checkout@v4
59+
- name: ⬇️ Download workspace
60+
uses: actions/download-artifact@v4
61+
with:
62+
name: project-workspace
63+
path: .
64+
65+
- name: ⚙️ Install pnpm
66+
uses: pnpm/action-setup@v4
67+
with:
68+
version: ${{ env.PNPM_VERSION }}
69+
70+
- name: ⚙️ Setup Node.js
71+
uses: actions/setup-node@v4
72+
with:
73+
node-version: ${{ env.NODE_VERSION }}
74+
cache: 'pnpm'
75+
76+
- name: 📦 Restore pnpm cache
77+
uses: actions/cache@v4
78+
with:
79+
path: ${{ needs.setup.outputs.pnpm_store_path }}
80+
key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }}
81+
restore-keys: |
82+
${{ runner.os }}-pnpm-
83+
4584
- name: 🥁 Install dependencies
46-
run: pnpm install --frozen-lockfile
85+
run: pnpm install --frozen-lockfile --store-dir ${{ needs.setup.outputs.pnpm_store_path }}
86+
4787
- name: 🔍 Run lint
4888
run: pnpm lint
49-
typecheck:
50-
name: 🔍 Type Check
51-
runs-on: ubuntu-latest
52-
needs: setup
53-
steps:
54-
- name: ⬇️ Checkout code
55-
uses: actions/checkout@v4
56-
- name: 🥁 Install dependencies
57-
run: pnpm install --frozen-lockfile
58-
- name: 🔍 Run type check
59-
run: pnpm typecheck
60-
test:
61-
name: 🧪 Test
62-
runs-on: ubuntu-latest
63-
timeout-minutes: 10
64-
needs: [lint, typecheck]
65-
steps:
66-
- name: ⬇️ Checkout code
67-
uses: actions/checkout@v4
68-
- name: 🥁 Install dependencies
69-
run: pnpm install --frozen-lockfile
70-
- name: 🔍 Run tests
71-
run: pnpm test
89+

0 commit comments

Comments
 (0)