From 5dddb79ca750f22ed34786661b3f07b4d482393c Mon Sep 17 00:00:00 2001 From: Xavier Rutayisire Date: Fri, 17 Jan 2025 10:24:47 +0100 Subject: [PATCH] fix: use caret for ts-codegen in plugin-kit & use github actions v4 (#1531) --- .github/actions/restore-cache/action.yml | 6 ++--- .github/actions/setup-node/action.yml | 2 +- .github/workflows/ci.yml | 34 +++++++++++++----------- .github/workflows/publish-stable.yml | 2 +- .github/workflows/publish-unstable.yml | 2 +- packages/plugin-kit/package.json | 2 +- yarn.lock | 4 +-- 7 files changed, 27 insertions(+), 25 deletions(-) diff --git a/.github/actions/restore-cache/action.yml b/.github/actions/restore-cache/action.yml index 519b822dd0..5e94225cb5 100644 --- a/.github/actions/restore-cache/action.yml +++ b/.github/actions/restore-cache/action.yml @@ -5,7 +5,7 @@ runs: steps: - name: Cache node_modules id: cache-dependencies - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: | node_modules @@ -14,7 +14,7 @@ runs: key: ${{ runner.os }}-${{ hashFiles('**/package-lock.json', '**/yarn.lock') }}-dependencies - name: Cache artifacts id: cache-artifacts - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: | packages/*/dist @@ -22,7 +22,7 @@ runs: key: ${{ runner.os }}-${{ github.run_id }}-artifacts - name: Cache playwright binaries id: cache-playwright-binaries - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: | ~/.cache/ms-playwright diff --git a/.github/actions/setup-node/action.yml b/.github/actions/setup-node/action.yml index ef7db1957c..26a7ad4561 100644 --- a/.github/actions/setup-node/action.yml +++ b/.github/actions/setup-node/action.yml @@ -5,7 +5,7 @@ runs: using: composite steps: - name: Use Node.js LTS - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: cache: yarn node-version: lts/* diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index dfc0e0685f..d54aeb1872 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -7,7 +7,7 @@ jobs: runs-on: [ubuntu-latest] steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Cache node_modules and artifacts uses: ./.github/actions/restore-cache @@ -25,7 +25,7 @@ jobs: runs-on: [windows-latest] steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Cache node_modules and artifacts uses: ./.github/actions/restore-cache @@ -44,7 +44,7 @@ jobs: runs-on: [ubuntu-latest] steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Restore cache uses: ./.github/actions/restore-cache @@ -76,7 +76,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Restore cache uses: ./.github/actions/restore-cache @@ -139,7 +139,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Restore cache uses: ./.github/actions/restore-cache @@ -165,10 +165,11 @@ jobs: strategy: fail-fast: false matrix: - shard: [1/8, 2/8, 3/8, 4/8, 5/8, 6/8, 7/8, 8/8] + shardIndex: [1, 2, 3, 4, 5, 6, 7, 8] + shardTotal: [8] steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Restore cache uses: ./.github/actions/restore-cache @@ -187,25 +188,25 @@ jobs: echo "telemetry=false" > ./e2e-projects/next/.prismicrc - name: Running E2E tests - run: yarn test:e2e --shard ${{ matrix.shard }} + run: yarn test:e2e --shard=${{ matrix.shardIndex }}/${{ matrix.shardTotal }} env: DEBUG: pw:test - name: Upload blob report to GitHub Actions Artifacts - uses: actions/upload-artifact@v3 - if: always() + uses: actions/upload-artifact@v4 + if: ${{ !cancelled() }} with: - name: e2e-all-blob-reports + name: e2e-blob-report-${{ matrix.shardIndex }} path: playwright/blob-report retention-days: 1 e2e-merge-reports: needs: e2e runs-on: ubuntu-latest - if: always() + if: ${{ !cancelled() }} steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Restore cache uses: ./.github/actions/restore-cache @@ -214,16 +215,17 @@ jobs: uses: ./.github/actions/setup-node - name: Download blob reports from GitHub Actions Artifacts - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: - name: e2e-all-blob-reports path: playwright/e2e-all-blob-reports + pattern: e2e-blob-report-* + merge-multiple: true - name: Merge into HTML Report run: yarn test:e2e:merge-reports --reporter html ./e2e-all-blob-reports - name: Upload HTML report - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: html-report--attempt-${{ github.run_attempt }} path: playwright/playwright-report diff --git a/.github/workflows/publish-stable.yml b/.github/workflows/publish-stable.yml index 48223a18b7..0a1db1d0e9 100644 --- a/.github/workflows/publish-stable.yml +++ b/.github/workflows/publish-stable.yml @@ -81,7 +81,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Check out repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Use Node.js uses: ./.github/actions/setup-node - name: Install dependencies diff --git a/.github/workflows/publish-unstable.yml b/.github/workflows/publish-unstable.yml index 398d8aea24..068708b082 100644 --- a/.github/workflows/publish-unstable.yml +++ b/.github/workflows/publish-unstable.yml @@ -12,7 +12,7 @@ jobs: if: ${{ !startsWith(github.event.head_commit.message, 'release:') && !github.event.pull_request.draft }} steps: - name: Check out repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 0 ref: ${{ github.head_ref || github.ref }} diff --git a/packages/plugin-kit/package.json b/packages/plugin-kit/package.json index 7632599ab2..cc225e7b7c 100644 --- a/packages/plugin-kit/package.json +++ b/packages/plugin-kit/package.json @@ -72,7 +72,7 @@ "io-ts-reporters": "^2.0.1", "p-limit": "^4.0.0", "prettier": "^3.0.3", - "prismic-ts-codegen": "0.1.23" + "prismic-ts-codegen": "^0.1.23" }, "devDependencies": { "@prismicio/mock": "0.3.7", diff --git a/yarn.lock b/yarn.lock index 8fdb8330b0..02c3215668 100644 --- a/yarn.lock +++ b/yarn.lock @@ -9903,7 +9903,7 @@ __metadata: p-limit: ^4.0.0 prettier: ^3.0.3 prettier-plugin-jsdoc: 1.1.1 - prismic-ts-codegen: 0.1.23 + prismic-ts-codegen: ^0.1.23 size-limit: 8.2.4 typescript: 4.9.5 vite: 4.3.9 @@ -29549,7 +29549,7 @@ __metadata: languageName: node linkType: hard -"prismic-ts-codegen@npm:0.1.23": +"prismic-ts-codegen@npm:0.1.23, prismic-ts-codegen@npm:^0.1.23": version: 0.1.23 resolution: "prismic-ts-codegen@npm:0.1.23" dependencies: