From 0fa25899f0e3778164322fd82583f4a5a6eefe43 Mon Sep 17 00:00:00 2001 From: Liam DeBeasi Date: Thu, 2 Nov 2023 17:52:46 -0400 Subject: [PATCH] chore(ci): build core with pnpm --- .github/workflows/actions/build-core/action.yml | 9 ++++++--- .github/workflows/actions/test-core-lint/action.yml | 7 +++++-- .../workflows/actions/test-core-screenshot/action.yml | 9 ++++++--- .github/workflows/actions/test-core-spec/action.yml | 9 ++++++--- 4 files changed, 23 insertions(+), 11 deletions(-) diff --git a/.github/workflows/actions/build-core/action.yml b/.github/workflows/actions/build-core/action.yml index b2b9fd75ed..0ca32c7804 100644 --- a/.github/workflows/actions/build-core/action.yml +++ b/.github/workflows/actions/build-core/action.yml @@ -12,19 +12,22 @@ runs: - uses: actions/setup-node@v3 with: node-version: 18.x + - uses: pnpm/action-setup@v2 + with: + version: 8 - name: Install Dependencies - run: npm install + run: pnpm install working-directory: ./core shell: bash # If an Ionicons version was specified install that. # Otherwise just use the version defined in the package.json. - name: Install Ionicons Version if: inputs.ionicons-version != '' - run: npm install ionicons@${{ inputs.ionicons-version }} + run: pnpm install ionicons@${{ inputs.ionicons-version }} working-directory: ./core shell: bash - name: Build Core - run: npm run build -- --ci + run: pnpm run build -- --ci working-directory: ./core shell: bash - uses: ./.github/workflows/actions/upload-archive diff --git a/.github/workflows/actions/test-core-lint/action.yml b/.github/workflows/actions/test-core-lint/action.yml index df5b2c3b5f..9a3926dc4c 100644 --- a/.github/workflows/actions/test-core-lint/action.yml +++ b/.github/workflows/actions/test-core-lint/action.yml @@ -6,12 +6,15 @@ runs: - uses: actions/setup-node@v3 with: node-version: 18.x + - uses: pnpm/action-setup@v2 + with: + version: 8 - name: Install Dependencies - run: npm ci + run: pnpm install working-directory: ./core shell: bash - name: Lint - run: npm run lint + run: pnpm run lint shell: bash working-directory: ./core # Lint changes should be pushed diff --git a/.github/workflows/actions/test-core-screenshot/action.yml b/.github/workflows/actions/test-core-screenshot/action.yml index 52596467d3..bc0340086f 100644 --- a/.github/workflows/actions/test-core-screenshot/action.yml +++ b/.github/workflows/actions/test-core-screenshot/action.yml @@ -14,18 +14,21 @@ runs: - uses: actions/setup-node@v3 with: node-version: 18.x + - uses: pnpm/action-setup@v2 + with: + version: 8 - uses: ./.github/workflows/actions/download-archive with: name: ionic-core path: ./core filename: CoreBuild.zip - name: Install Playwright Dependencies - run: npm install && npx playwright install && npx playwright install-deps + run: pnpm install && pnpm dlx playwright install && pnpm dlx playwright install-deps shell: bash working-directory: ./core - name: Test if: inputs.update != 'true' - run: npm run test.e2e -- --shard=${{ inputs.shard }}/${{ inputs.totalShards }} + run: pnpm run test.e2e -- --shard=${{ inputs.shard }}/${{ inputs.totalShards }} shell: bash working-directory: ./core - name: Test and Update @@ -47,7 +50,7 @@ runs: # which is why we not using the upload-archive # composite step here. run: | - npm run test.e2e -- --shard=${{ inputs.shard }}/${{ inputs.totalShards }} --update-snapshots + pnpm run test.e2e -- --shard=${{ inputs.shard }}/${{ inputs.totalShards }} --update-snapshots git add src/\*.png --force mkdir updated-screenshots cd ../ && rsync -R --progress $(git diff --name-only --cached) core/updated-screenshots diff --git a/.github/workflows/actions/test-core-spec/action.yml b/.github/workflows/actions/test-core-spec/action.yml index 785a84bfa7..8b6bdd1556 100644 --- a/.github/workflows/actions/test-core-spec/action.yml +++ b/.github/workflows/actions/test-core-spec/action.yml @@ -9,12 +9,15 @@ runs: - uses: actions/setup-node@v3 with: node-version: 18.x + - uses: pnpm/action-setup@v2 + with: + version: 8 - name: Install Dependencies - run: npm ci + run: pnpm install working-directory: ./core shell: bash - name: Install Stencil ${{ inputs.stencil-version }} - run: npm install @stencil/core@${{ inputs.stencil-version }} + run: pnpm install @stencil/core@${{ inputs.stencil-version }} shell: bash working-directory: ./core if: ${{ inputs.stencil-version != '' }} @@ -24,6 +27,6 @@ runs: path: ./core filename: CoreBuild.zip - name: Test - run: npm run test.spec -- --ci + run: pnpm run test.spec -- --ci shell: bash working-directory: ./core