update peerDependencies
to allow usage with 3.9 alpha
#138
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: "18.x" | |
cache: "yarn" | |
- run: yarn install --frozen-lockfile | |
- 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 | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: "18.x" | |
cache: "yarn" | |
- run: yarn install --frozen-lockfile | |
- 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' | |
- 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 |