From 4c3920ddae49ad93e9d7666c9569e21c6c21f9de Mon Sep 17 00:00:00 2001 From: Kurdistan Tech Ministry Date: Fri, 13 Feb 2026 01:42:00 +0300 Subject: [PATCH] Fix CI workflows to use Yarn 4 (Berry) with corepack - Add packageManager field to package.json for corepack - Add .yarnrc.yml with node-modules linker - Update all workflows to use corepack enable + yarn --immutable - Remove yarn cache from actions/setup-node (incompatible with Yarn 4) --- .github/workflows/ci.yml | 6 ++++-- .github/workflows/code-quality.yml | 18 ++++++++++++------ .github/workflows/deploy.yml | 12 ++++++++---- .github/workflows/security.yml | 12 ++++++++---- .yarnrc.yml | 1 + package.json | 1 + 6 files changed, 34 insertions(+), 16 deletions(-) create mode 100644 .yarnrc.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6bf5dae..c37a2a2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,10 +18,12 @@ jobs: uses: actions/setup-node@v4 with: node-version: '18' - cache: 'yarn' + + - name: Enable Corepack + run: corepack enable - name: Install dependencies - run: yarn install --frozen-lockfile + run: yarn install --immutable - name: Generate types run: yarn codegen diff --git a/.github/workflows/code-quality.yml b/.github/workflows/code-quality.yml index cea7d8d..870f9e7 100644 --- a/.github/workflows/code-quality.yml +++ b/.github/workflows/code-quality.yml @@ -19,10 +19,12 @@ jobs: uses: actions/setup-node@v4 with: node-version: '18' - cache: 'yarn' + + - name: Enable Corepack + run: corepack enable - name: Install dependencies - run: yarn install --frozen-lockfile + run: yarn install --immutable - name: Run ESLint run: yarn eslint src/ --ext .ts --max-warnings 0 @@ -40,10 +42,12 @@ jobs: uses: actions/setup-node@v4 with: node-version: '18' - cache: 'yarn' + + - name: Enable Corepack + run: corepack enable - name: Install dependencies - run: yarn install --frozen-lockfile + run: yarn install --immutable - name: Check formatting run: yarn prettier --check "src/**/*.ts" @@ -60,10 +64,12 @@ jobs: uses: actions/setup-node@v4 with: node-version: '18' - cache: 'yarn' + + - name: Enable Corepack + run: corepack enable - name: Install dependencies - run: yarn install --frozen-lockfile + run: yarn install --immutable - name: Generate types run: yarn codegen diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 7392614..13d9e64 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -31,10 +31,12 @@ jobs: uses: actions/setup-node@v4 with: node-version: '18' - cache: 'yarn' + + - name: Enable Corepack + run: corepack enable - name: Install dependencies - run: yarn install --frozen-lockfile + run: yarn install --immutable - name: Generate types run: yarn codegen @@ -57,10 +59,12 @@ jobs: uses: actions/setup-node@v4 with: node-version: '18' - cache: 'yarn' + + - name: Enable Corepack + run: corepack enable - name: Install dependencies - run: yarn install --frozen-lockfile + run: yarn install --immutable - name: Generate types run: yarn codegen diff --git a/.github/workflows/security.yml b/.github/workflows/security.yml index 7b6b8f9..8b9c31e 100644 --- a/.github/workflows/security.yml +++ b/.github/workflows/security.yml @@ -30,10 +30,12 @@ jobs: uses: actions/setup-node@v4 with: node-version: '18' - cache: 'yarn' + + - name: Enable Corepack + run: corepack enable - name: Install dependencies - run: yarn install --frozen-lockfile + run: yarn install --immutable - name: Build run: yarn build @@ -53,10 +55,12 @@ jobs: uses: actions/setup-node@v4 with: node-version: '18' - cache: 'yarn' + + - name: Enable Corepack + run: corepack enable - name: Install dependencies - run: yarn install --frozen-lockfile + run: yarn install --immutable - name: Run npm audit run: yarn npm audit --all --recursive || true diff --git a/.yarnrc.yml b/.yarnrc.yml new file mode 100644 index 0000000..3186f3f --- /dev/null +++ b/.yarnrc.yml @@ -0,0 +1 @@ +nodeLinker: node-modules diff --git a/package.json b/package.json index f8359cc..62b06c1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,7 @@ { "name": "subquery-pezkuwi", "version": "1.0.0", + "packageManager": "yarn@4.12.0", "description": "Pezkuwi SubQuery - Staking rewards, NominationPools, transfers indexer for PezWallet", "main": "dist/index.js", "scripts": {