Skip to content

Commit

Permalink
Add CI job to check graphql schema
Browse files Browse the repository at this point in the history
  • Loading branch information
gustavlrsn committed Jan 20, 2025
1 parent 9a5725f commit 5f3185c
Show file tree
Hide file tree
Showing 4 changed files with 410 additions and 0 deletions.
70 changes: 70 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,76 @@ jobs:

- run: npm run langs:check

check-graphql:
runs-on: ubuntu-latest
timeout-minutes: 15

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup project
uses: ./.github/actions/setup-project
with:
CACHE_VERSION: ${{ secrets.CACHE_VERSION }}

- run: npm run graphql:check

check-graphql-alt:
runs-on: ubuntu-latest
timeout-minutes: 15

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup project
uses: ./.github/actions/setup-project
with:
CACHE_VERSION: ${{ secrets.CACHE_VERSION }}

- name: Run GraphQL update
run: |
npm run graphql:update | tee /dev/stdout
- name: Check for schema changes
run: |
if [ -n "$(git status --porcelain)" ]; then
echo "Error: GraphQL schema is not up to date. Please update the schema and commit changes." && exit 1
else
echo "GraphQL schema is up to date."
fi
check-codegen:
runs-on: ubuntu-latest
timeout-minutes: 15

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup project
uses: ./.github/actions/setup-project
with:
CACHE_VERSION: ${{ secrets.CACHE_VERSION }}

- run: npm run graphql:codegen-check -- --verbose --concurrency=1

check-codegen-alt:
runs-on: ubuntu-latest
timeout-minutes: 15

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup project
uses: ./.github/actions/setup-project
with:
CACHE_VERSION: ${{ secrets.CACHE_VERSION }}

- run: npm run graphql:codegen-check -- --verbose 2>&1 | tee codegen.log

build:
runs-on: ubuntu-latest

Expand Down
298 changes: 298 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 5f3185c

Please sign in to comment.