Skip to content

Commit d7e2158

Browse files
committed
updates
1 parent f8ce00a commit d7e2158

File tree

1 file changed

+44
-38
lines changed

1 file changed

+44
-38
lines changed

.github/workflows/ci.yml

Lines changed: 44 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -2,84 +2,90 @@ name: CI Pipeline
22

33
on:
44
push:
5+
pull_request:
56

67
env:
78
NODE_VERSION: '18'
8-
PNPM_VERSION: '10'
9+
PNPM_VERSION: '8' # Using stable version
910

1011
jobs:
11-
lint:
12-
name: Lint
12+
build:
13+
name: Build
1314
runs-on: ubuntu-latest
1415
steps:
1516
- uses: actions/checkout@v4
1617

17-
# Setup Node.js with pnpm cache
18+
- name: Install pnpm
19+
uses: pnpm/action-setup@v4
20+
with:
21+
version: ${{ env.PNPM_VERSION }}
22+
run_install: false
23+
1824
- name: Setup Node.js
1925
uses: actions/setup-node@v4
2026
with:
2127
node-version: ${{ env.NODE_VERSION }}
2228
cache: 'pnpm'
2329

24-
# Install pnpm explicitly
30+
- run: pnpm install --frozen-lockfile
31+
- run: pnpm build
32+
- uses: actions/upload-artifact@v3
33+
with:
34+
name: build-artifacts
35+
path: dist/
36+
37+
lint:
38+
name: Lint
39+
needs: [build]
40+
runs-on: ubuntu-latest
41+
steps:
42+
- uses: actions/checkout@v4
43+
44+
# First install pnpm globally
2545
- name: Install pnpm
2646
uses: pnpm/action-setup@v4
2747
with:
2848
version: ${{ env.PNPM_VERSION }}
49+
run_install: false
2950

30-
# Verify pnpm is available
31-
- name: Check pnpm version
32-
run: pnpm --version
51+
# Then setup Node.js with pnpm cache
52+
- name: Setup Node.js
53+
uses: actions/setup-node@v4
54+
with:
55+
node-version: ${{ env.NODE_VERSION }}
56+
cache: 'pnpm'
57+
58+
# Verify installations
59+
- name: Check versions
60+
run: |
61+
node --version
62+
pnpm --version
3363
3464
- run: pnpm install --frozen-lockfile
3565
- run: pnpm lint
3666

3767
test:
3868
name: Test with Coverage
69+
needs: [build]
3970
runs-on: ubuntu-latest
4071
steps:
4172
- uses: actions/checkout@v4
4273

43-
- name: Setup Node.js
44-
uses: actions/setup-node@v4
45-
with:
46-
node-version: ${{ env.NODE_VERSION }}
47-
cache: 'pnpm'
48-
4974
- name: Install pnpm
5075
uses: pnpm/action-setup@v4
5176
with:
5277
version: ${{ env.PNPM_VERSION }}
53-
54-
- run: pnpm install --frozen-lockfile
55-
- run: pnpm test:coverage
56-
57-
- name: Upload coverage to Codecov
58-
uses: codecov/codecov-action@v5
59-
with:
60-
token: ${{ secrets.CODECOV_TOKEN }}
61-
62-
build:
63-
name: Build
64-
needs: [lint, test]
65-
runs-on: ubuntu-latest
66-
steps:
67-
- uses: actions/checkout@v4
78+
run_install: false
6879

6980
- name: Setup Node.js
7081
uses: actions/setup-node@v4
7182
with:
7283
node-version: ${{ env.NODE_VERSION }}
7384
cache: 'pnpm'
7485

75-
- name: Install pnpm
76-
uses: pnpm/action-setup@v4
77-
with:
78-
version: ${{ env.PNPM_VERSION }}
79-
8086
- run: pnpm install --frozen-lockfile
81-
- run: pnpm build
82-
- uses: actions/upload-artifact@v3
87+
- run: pnpm test:coverage
88+
- name: Upload coverage to Codecov
89+
uses: codecov/codecov-action@v5
8390
with:
84-
name: build-artifacts
85-
path: dist/
91+
token: ${{ secrets.CODECOV_TOKEN }}

0 commit comments

Comments
 (0)