Skip to content

Commit

Permalink
Merge branch 'main' into fix/mockServiceWorker-passthrough-header-issue
Browse files Browse the repository at this point in the history
  • Loading branch information
kettanaito committed Dec 5, 2024
2 parents 5d31840 + e61ee12 commit 5741af9
Show file tree
Hide file tree
Showing 20 changed files with 6,716 additions and 5,753 deletions.
155 changes: 144 additions & 11 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,65 @@ on:
workflow_dispatch:

jobs:
# Builds the library and persists it as an artifact.
# Later jobs can then reuse that build artifact, skipping
# the build step.
build:
runs-on: macos-latest
strategy:
fail-fast: false
matrix:
node-version: [18, 20]
steps:
- name: Checkout
uses: actions/checkout@v4

- uses: pnpm/action-setup@v4
with:
version: 9.14.0

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 18
node-version: ${{ matrix.node-version }}
cache: 'pnpm'

- name: Install dependencies
run: pnpm install

- name: Build
run: pnpm build

- name: Cache build output
uses: actions/cache@v4
with:
path: ./lib
key: ${{ runner.os }}-node-${{ matrix.node-version }}-build-${{ github.sha }}
restore-keys: |
${{ runner.os }}-build-${{ matrix.node-version }}
test_unit:
name: test (unit)
needs: build
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- uses: pnpm/action-setup@v4
with:
version: 8.15.6
version: 9.14.0

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 18
cache: 'pnpm'

- name: Restore build cache
uses: actions/cache@v4
with:
path: ./lib
key: ${{ runner.os }}-node-18-build-${{ github.sha }}
restore-keys: |
${{ runner.os }}-node-18-build-
- name: Install dependencies
run: pnpm install
Expand All @@ -37,21 +79,112 @@ jobs:
- name: Unit tests
run: pnpm test:unit

- name: Build
run: pnpm build
test-node:
name: test (node.js)
needs: build
runs-on: macos-latest
strategy:
fail-fast: false
matrix:
node-version: [18, 20]
steps:
- name: Checkout
uses: actions/checkout@v4

- uses: pnpm/action-setup@v4
with:
version: 9.14.0

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'pnpm'

- name: Restore build cache
uses: actions/cache@v4
with:
path: ./lib
key: ${{ runner.os }}-node${{ matrix.node-version }}-build-${{ github.sha }}
restore-keys: |
${{ runner.os }}-node-18-build-
- name: Install dependencies
run: pnpm install

- name: Node.js tests
run: pnpm test:node

test-browser:
name: test (browser)
needs: build
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- uses: pnpm/action-setup@v4
with:
version: 9.14.0

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 18
cache: 'pnpm'

- name: Restore build cache
uses: actions/cache@v4
with:
path: ./lib
key: ${{ runner.os }}-node-18-build-${{ github.sha }}
restore-keys: |
${{ runner.os }}-node-18-build-
- name: Install dependencies
run: pnpm install

- name: Playwright install
run: pnpm exec playwright install --with-deps chromium

- name: Browser tests
run: pnpm test:browser

- name: Native tests
run: pnpm test:native

- name: Upload test artifacts
if: always()
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: playwright-report
path: test/browser/test-results

test-native:
name: test (react-native)
needs: build
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- uses: pnpm/action-setup@v4
with:
version: 9.14.0

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 18
cache: 'pnpm'

- name: Restore build cache
uses: actions/cache@v4
with:
path: ./lib
key: ${{ runner.os }}-node-18-build-${{ github.sha }}
restore-keys: |
${{ runner.os }}-node-18-build-
- name: Install dependencies
run: pnpm install

- name: Native tests
run: pnpm test:native
8 changes: 4 additions & 4 deletions .github/workflows/compat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
- name: Set up pnpm
uses: pnpm/action-setup@v4
with:
version: 8.15.6
version: 9.14.0

- name: Install dependencies
run: pnpm install
Expand Down Expand Up @@ -57,16 +57,16 @@ jobs:
ts: ['4.8', '4.9', '5.0', '5.1', '5.2', '5.3', '5.4', '5.5']
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 18

- uses: pnpm/action-setup@v4
with:
version: 8.15.6
version: 9.14.0

- name: Install dependencies
run: pnpm install
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
- name: Set up pnpm
uses: pnpm/action-setup@v4
with:
version: 8.15.6
version: 9.14.0

- name: Install dependencies
run: pnpm install
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
- name: Set up pnpm
uses: pnpm/action-setup@v4
with:
version: 8.15.6
version: 9.14.0

- name: Setup Git
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/smoke-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
- name: Set up pnpm
uses: pnpm/action-setup@v4
with:
version: 8.15.6
version: 9.14.0

- name: Install dependencies
run: pnpm install
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/typescript-nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:
- name: Set up pnpm
uses: pnpm/action-setup@v4
with:
version: 8.15.6
version: 9.14.0

- name: Install dependencies
run: pnpm install
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"main": "./lib/core/index.js",
"module": "./lib/core/index.mjs",
"types": "./lib/core/index.d.ts",
"packageManager": "pnpm@8.15.6",
"packageManager": "pnpm@9.14.0",
"exports": {
".": {
"types": "./lib/core/index.d.ts",
Expand Down Expand Up @@ -193,7 +193,7 @@
"json-bigint": "^1.0.0",
"lint-staged": "^15.2.10",
"page-with": "^0.6.1",
"prettier": "^3.3.3",
"prettier": "^3.4.2",
"regenerator-runtime": "^0.14.1",
"rimraf": "^6.0.1",
"simple-git-hooks": "^2.9.0",
Expand All @@ -202,7 +202,7 @@
"typescript": "^5.5.2",
"undici": "^6.20.0",
"url-loader": "^4.1.1",
"vitest": "^1.2.2",
"vitest": "^2.1.8",
"vitest-environment-miniflare": "^2.14.4",
"webpack": "^5.95.0",
"webpack-http-server": "^0.5.0"
Expand Down
Loading

0 comments on commit 5741af9

Please sign in to comment.