Skip to content

Commit 0f7b475

Browse files
committed
refactor: update CI workflow to use Yarn v4 and simplify steps
1 parent f23e00f commit 0f7b475

1 file changed

Lines changed: 2 additions & 16 deletions

File tree

.github/workflows/ci.yml

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
name: CI
2-
32
on:
43
push:
54
branches:
@@ -18,54 +17,41 @@ jobs:
1817
steps:
1918
- name: Checkout code
2019
uses: actions/checkout@v4
21-
2220
- name: Validate package manager
2321
run: |
2422
if [ ! -f "yarn.lock" ]; then
2523
echo "Expected yarn.lock but it was not found."
26-
echo "Please use Yarn v2 (Berry) for this project."
24+
echo "Please use Yarn v4 (Berry) for this project."
2725
exit 1
2826
fi
2927
echo "yarn.lock found — package manager check passed."
3028
3129
test-and-build:
3230
runs-on: ubuntu-latest
33-
3431
steps:
3532
- name: Checkout repository
3633
uses: actions/checkout@v4
37-
3834
- name: Setup Node.js
3935
uses: actions/setup-node@v4
4036
with:
4137
node-version: 24
42-
43-
- name: Enable Corepack (Yarn Berry)
38+
- name: Enable Corepack
4439
run: corepack enable
45-
46-
- name: Install Yarn Berry
47-
run: corepack prepare yarn@stable --activate
48-
4940
- name: Get Yarn cache directory
5041
id: yarn-cache-dir
5142
run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT
52-
5343
- name: Cache Yarn dependencies
5444
uses: actions/cache@v4
5545
with:
5646
path: ${{ steps.yarn-cache-dir.outputs.dir }}
5747
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
5848
restore-keys: |
5949
${{ runner.os }}-yarn-
60-
6150
- name: Install dependencies
6251
run: yarn install --immutable
63-
6452
- name: Lint
6553
run: yarn lint
66-
6754
- name: Build
6855
run: yarn build
69-
7056
- name: Test
7157
run: yarn test

0 commit comments

Comments
 (0)