Skip to content

Commit

Permalink
Use Apollo's Federation compatibility checker action (#2511)
Browse files Browse the repository at this point in the history
  • Loading branch information
enisdenjo authored Feb 28, 2023
1 parent 067dd2f commit d6f9868
Showing 1 changed file with 32 additions and 15 deletions.
47 changes: 32 additions & 15 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -215,25 +215,42 @@ jobs:
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Setup env
uses: the-guild-org/shared-config/setup@main
- name: Install Node
uses: actions/setup-node@v3
with:
nodeVersion: 18
packageManager: pnpm
node-version: ${{ matrix.node-version }}
- name: Install pnpm
uses: pnpm/action-setup@v2.2.4
with:
version: 7
- name: Get pnpm store path
id: pnpm-store
run: echo "PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
- name: Cache pnpm
uses: actions/cache@v3
with:
path: ${{ steps.pnpm-store.outputs.PATH }}
key: ${{ runner.os }}-pnpm-store-graphql-v${{ matrix.graphql-version }}-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-graphql-v${{ matrix.graphql-version }}-
- name: Install Dependencies
run: pnpm i
- name: Build Packages
run: pnpm build
- name: Create Bundle
working-directory: examples/apollo-federation-compatibility
run: pnpm build
- name: Bundle Apollo Federation Subgraph Example
run: pnpm --filter=example-apollo-federation-compatibility build
- name: Install Rover
run: curl -sSL https://rover.apollo.dev/nix/v0.11.1 | sh
- name: Add Rover to PATH
run: echo "$HOME/.rover/bin" >> $GITHUB_PATH
- name: Run Tests
working-directory: examples/apollo-federation-compatibility
run: pnpm test
env:
APOLLO_ELV2_LICENSE: accept
- name: Report
working-directory: examples/apollo-federation-compatibility
run: cat results.md > $GITHUB_STEP_SUMMARY
- name: Apollo Federation Subgraph Compatibility
uses: apollographql/federation-subgraph-compatibility@v1
with:
workingDirectory: examples/apollo-federation-compatibility
compose: docker-compose.yaml
schema: schema.graphql
path: /graphql
token: ${{ secrets.GITHUB_TOKEN }}
failOnWarning: true
failOnRequired: true
debug: true

0 comments on commit d6f9868

Please sign in to comment.