Skip to content

reduce bundle size by adjusting imports #242

reduce bundle size by adjusting imports

reduce bundle size by adjusting imports #242

Workflow file for this run

name: Run tests
on:
push:
paths:
- "package/**"
- "integration-test/**"
pull_request:
paths:
- "package/**"
- "integration-test/**"
workflow_dispatch:
jobs:
test:
name: Run unit tests
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
version: ["latest", "next", "0.0.0-pr-11345-20231129164802"]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: "18.x"
cache: "yarn"
- run: yarn install --immutable
- run: yarn workspace @apollo/experimental-nextjs-app-support add -D -P @apollo/client@${{ matrix.version }}
- run: yarn workspace @apollo/experimental-nextjs-app-support run test > $GITHUB_STEP_SUMMARY
tests_playwright:
name: Run Playwright tests
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
version: ["latest", "next", "0.0.0-pr-11345-20231129164802"]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: "18.x"
cache: "yarn"
- run: yarn install --immutable
- name: Get installed Playwright version
id: playwright-version
run: yarn why @playwright/test --json | jq '.children|to_entries[0].value.locator' --raw-output | sed 's/^.*npm:/PLAYWRIGHT_VERSION=/' >> $GITHUB_ENV
- name: Cache playwright binaries
uses: actions/cache@v3
id: playwright-cache
with:
path: |
~/.cache/ms-playwright
key: ${{ runner.os }}-playwright-${{ env.PLAYWRIGHT_VERSION }}
- run: npx playwright install --with-deps
if: steps.playwright-cache.outputs.cache-hit != 'true'
- run: npx playwright install-deps
if: steps.playwright-cache.outputs.cache-hit == 'true'
- run: yarn workspace @apollo/experimental-nextjs-app-support add -D -P @apollo/client@${{ matrix.version }}
- run: yarn workspace integration-test add @apollo/client@${{ matrix.version }}
- name: Build
run: yarn workspaces foreach -R -t --from integration-test run build
- name: Run tests
run: yarn workspace integration-test run test > $GITHUB_STEP_SUMMARY