From b554df1c01881810fe3e217ec14a8f45ccbde74b Mon Sep 17 00:00:00 2001 From: James Chen Date: Wed, 28 Feb 2024 15:03:11 +0800 Subject: [PATCH] Update ci scripts --- .github/workflows/api-check.yaml | 8 +++++++- .github/workflows/code-quality.yaml | 8 +++++++- .github/workflows/publish.yaml | 8 +++++++- .github/workflows/test.yaml | 9 ++++++++- modules/build-engine/package.json | 6 +++--- package.json | 1 + pnpm-lock.yaml | 18 +++++++++--------- 7 files changed, 42 insertions(+), 16 deletions(-) diff --git a/.github/workflows/api-check.yaml b/.github/workflows/api-check.yaml index ab7f293..b73a57e 100644 --- a/.github/workflows/api-check.yaml +++ b/.github/workflows/api-check.yaml @@ -6,11 +6,17 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 + - name: Set up pnpm + uses: pnpm/action-setup@v2 + with: + version: 8 + - uses: actions/setup-node@v3 with: node-version: '18.17.0' + cache: 'pnpm' - - run: npm ci + - run: pnpm install - name: Copy old public.d.ts run: mv ./.api/public.d.ts ./.api/public_old.d.ts diff --git a/.github/workflows/code-quality.yaml b/.github/workflows/code-quality.yaml index 00a87da..38bbdca 100644 --- a/.github/workflows/code-quality.yaml +++ b/.github/workflows/code-quality.yaml @@ -6,12 +6,18 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 + - name: Set up pnpm + uses: pnpm/action-setup@v2 + with: + version: 8 + - uses: actions/setup-node@v3 with: node-version: '18.17.0' + cache: 'pnpm' - name: Build all modules - run: npm ci + run: pnpm install - name: Get changed files id: changed-files diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index 5580a02..c710bc6 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -10,11 +10,17 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 + - name: Set up pnpm + uses: pnpm/action-setup@v2 + with: + version: 8 + - uses: actions/setup-node@v3 with: node-version: '18.17.0' + cache: 'pnpm' - - run: npm ci + - run: pnpm install - run: npm test diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index f4387ae..e399719 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -10,14 +10,21 @@ jobs: runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v3 + + - name: Set up pnpm + uses: pnpm/action-setup@v2 + with: + version: 8 + - uses: actions/setup-node@v3 with: node-version: '18.17.0' + cache: 'pnpm' - run: node --version - run: npm --version - - run: npm ci + - run: pnpm install - run: npm test diff --git a/modules/build-engine/package.json b/modules/build-engine/package.json index 3f32f34..12483a6 100644 --- a/modules/build-engine/package.json +++ b/modules/build-engine/package.json @@ -19,6 +19,9 @@ "author": "", "license": "ISC", "dependencies": { + "@types/babel__core": "7.1.20", + "@types/babel__generator": "7.6.4", + "@types/babel__traverse": "7.18.2", "@babel/core": "^7.20.12", "@babel/parser": "^7.20.13", "@babel/traverse": "^7.20.13", @@ -37,9 +40,6 @@ "@ccbuild/modularize": "workspace:*" }, "devDependencies": { - "@types/babel__core": "7.1.20", - "@types/babel__generator": "7.6.4", - "@types/babel__traverse": "7.18.2", "@types/dedent": "^0.7.0", "@types/fs-extra": "^9.0.13", "@types/jest": "^29.2.3", diff --git a/package.json b/package.json index b0f2758..17f905a 100644 --- a/package.json +++ b/package.json @@ -4,6 +4,7 @@ "description": "The next generation of build tool for Cocos engine.", "main": "./lib/index.js", "types": "./lib/index.d.ts", + "packageManager": "pnpm@8.12.1", "scripts": { "build": "tsc && turbo build", "change": "node ./scripts/remove-workspaces.js && changeset add && node ./scripts/restore-workspaces.js", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index d7cdd05..dd0fc5b 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -147,6 +147,15 @@ importers: '@ccbuild/utils': specifier: workspace:* version: link:../utils + '@types/babel__core': + specifier: 7.1.20 + version: 7.1.20 + '@types/babel__generator': + specifier: 7.6.4 + version: 7.6.4 + '@types/babel__traverse': + specifier: 7.18.2 + version: 7.18.2 '@types/resolve': specifier: ^1.20.2 version: 1.20.2 @@ -173,15 +182,6 @@ importers: specifier: 5.9.2 version: 5.9.2 devDependencies: - '@types/babel__core': - specifier: 7.1.20 - version: 7.1.20 - '@types/babel__generator': - specifier: 7.6.4 - version: 7.6.4 - '@types/babel__traverse': - specifier: 7.18.2 - version: 7.18.2 '@types/dedent': specifier: ^0.7.0 version: 0.7.0