Skip to content

Commit

Permalink
NoMongo: Restore the GraphQL Introspection GitHub Action Test
Browse files Browse the repository at this point in the history
  • Loading branch information
Priyanshuthapliyal2005 committed Jan 31, 2025
1 parent 6051ed6 commit e2d0e5d
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ jobs:
npx graphql-inspector validate schema.graphql src/**/*.graphql
Graphql-Inspector:
# if: ${{ github.actor != 'dependabot[bot]' }}
if: ${{ github.actor != 'dependabot[bot]' }}
name: Runs Introspection on the GitHub talawa-api repo on the schema.graphql file
runs-on: ubuntu-latest
steps:
Expand All @@ -295,12 +295,12 @@ jobs:
node-version: '22.x'

- name: resolve dependency
run: npm install -g @graphql-inspector/cli
run: npm install -g @graphql-inspector/cli@latest

- name: Clone API Repository
env:
BASE_REF: ${{ github.base_ref }}
run: >
BASE_REF: ${{ github.event.pull_request.base.ref }}
run: |
# Retrieve the complete branch name directly from the GitHub context
FULL_BRANCH_NAME="$BASE_REF"
echo "FULL_BRANCH_NAME: $FULL_BRANCH_NAME"
Expand All @@ -317,22 +317,24 @@ jobs:
fi
# Verify clone was successful
if [ ! -d "talawa-api" ]; then
echo "Error: talawa-api directory not found after clone"
exit 1
echo "Error: talawa-api directory not found after clone"
exit 1
fi
- name: Validate Documents
run: >
run: |
if [ ! -f './talawa-api/schema.graphql' ]; then
echo "Error: schema.graphql not found in talawa-api"
exit 1
fi
GRAPHQL_FILES=$(find ./src/GraphQl -name "*.ts" -type f)
GRAPHQL_FILES=$(find ./src/GraphQl -type f \( -name "*.ts" -o -name "*.tsx" \))
if [ -z "$GRAPHQL_FILES" ]; then
echo "Error: No GraphQL TypeScript files found"
exit 1
fi
graphql-inspector validate './src/GraphQl/**/*.ts' './talawa-api/schema.graphql'
echo "Found GraphQL files:"
echo "$GRAPHQL_FILES"
graphql-inspector validate './src/GraphQl/**/*.{ts,tsx}' './talawa-api/schema.graphql'
Start-App-Without-Docker:
name: Check if Talawa Admin app starts (No Docker)
Expand Down

0 comments on commit e2d0e5d

Please sign in to comment.