chore(deps): update dependency superjson to v2 #856
Workflow file for this run
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: | |
- ".github/workflows/**" | |
- "packages/**" | |
- "integration-test/**" | |
pull_request: | |
paths: | |
- ".github/workflows/**" | |
- "packages/**" | |
- "integration-test/**" | |
- "yarn.lock" | |
workflow_dispatch: | |
jobs: | |
matrix: | |
name: Determine if the `next` tag is higher than the `latest` tag | |
runs-on: ubuntu-latest | |
outputs: | |
version: ${{ steps.version.outputs.matrix }} | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: "20.x" | |
cache: "yarn" | |
- run: yarn install --immutable | |
- name: Calculate Matrix | |
id: version | |
run: yarn matrix | tee $GITHUB_OUTPUT | |
test: | |
name: Unit Tests | |
needs: matrix | |
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: ${{ fromJson(needs.matrix.outputs.version) }} | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: "20.x" | |
cache: "yarn" | |
- run: yarn install --immutable | |
- run: yarn workspaces foreach --all --include "@apollo/*" add -D -P @apollo/client@${{ matrix.version }} | |
- run: yarn workspaces foreach --all --include "@apollo/*" run build | |
- run: yarn workspaces foreach --all --include "@apollo/*" run test | tee $GITHUB_STEP_SUMMARY; exit ${PIPESTATUS[0]} | |
packageShapes: | |
name: Test Bundles | |
needs: matrix | |
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: ${{ fromJson(needs.matrix.outputs.version) }} | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: "20.x" | |
cache: "yarn" | |
- run: yarn install --immutable | |
- run: yarn workspaces foreach --all --include "@apollo/*" add -D -P @apollo/client@${{ matrix.version }} | |
- run: yarn workspaces foreach --all --include "@apollo/*" run test-bundle | tee $GITHUB_STEP_SUMMARY; exit ${PIPESTATUS[0]} | |
tests_playwright: | |
name: Integration Tests | |
needs: matrix | |
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: ${{ fromJson(needs.matrix.outputs.version) }} | |
defaults: | |
run: | |
working-directory: ./integration-test | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: "20.x" | |
cache: "yarn" | |
- name: Install Packages (Root) | |
run: yarn install --immutable | |
working-directory: ./ | |
- name: Set target version of Apollo Client (Root) | |
run: yarn workspaces foreach --all --include "@apollo/*" add -D -P @apollo/client@${{ matrix.version }} | |
working-directory: ./ | |
- name: Install Packages (Integration Test) | |
run: | | |
yarn install | |
env: | |
YARN_ENABLE_IMMUTABLE_INSTALLS: "false" | |
- name: Set target version of Apollo Client (Integration Test) | |
run: yarn workspaces foreach --all --include "@integration-test/*" add @apollo/client@${{ matrix.version }} | |
- 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: "Next.js: Build" | |
run: yarn workspace @integration-test/nextjs run build | |
# Upload webpack-stats.json to use on relative-ci.yaml workflow | |
- name: Upload webpack stats artifact | |
if: matrix.version == 'latest' | |
uses: relative-ci/agent-upload-artifact-action@v1 | |
with: | |
webpackStatsFile: ./integration-test/nextjs/webpack-stats.json | |
- name: "Next.js: Test" | |
run: yarn workspace @integration-test/nextjs run test | tee $GITHUB_STEP_SUMMARY; exit ${PIPESTATUS[0]} | |
- name: "Experimentally patched React: Build" | |
run: yarn workspace @integration-test/experimental-react run build | |
- name: "Experimentally patched React: Test" | |
run: yarn workspace @integration-test/experimental-react run test | tee $GITHUB_STEP_SUMMARY; exit ${PIPESTATUS[0]} | |
- name: "Vite Streaming: Build" | |
run: yarn workspace @integration-test/vite-streaming run build | |
- name: "Vite Streaming: Test" | |
run: yarn workspace @integration-test/vite-streaming run test | tee $GITHUB_STEP_SUMMARY; exit ${PIPESTATUS[0]} | |
- name: "Jest: Test" | |
run: yarn workspace @integration-test/jest run test | tee $GITHUB_STEP_SUMMARY; exit ${PIPESTATUS[0]} |