Skip to content

Commit

Permalink
fix: use caret for ts-codegen in plugin-kit & use github actions v4 (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
xrutayisire authored Jan 17, 2025
1 parent 0619073 commit 5dddb79
Show file tree
Hide file tree
Showing 7 changed files with 27 additions and 25 deletions.
6 changes: 3 additions & 3 deletions .github/actions/restore-cache/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -14,15 +14,15 @@ 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
packages/core/build
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
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/setup-node/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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/*
Expand Down
34 changes: 18 additions & 16 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -76,7 +76,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Restore cache
uses: ./.github/actions/restore-cache
Expand Down Expand Up @@ -139,7 +139,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Restore cache
uses: ./.github/actions/restore-cache
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish-stable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish-unstable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
2 changes: 1 addition & 1 deletion packages/plugin-kit/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
4 changes: 2 additions & 2 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit 5dddb79

Please sign in to comment.