mirror of
https://github.com/graphql-hive/console
synced 2026-04-21 14:37:17 +00:00
56 lines
1.4 KiB
YAML
56 lines
1.4 KiB
YAML
on:
|
|
workflow_call:
|
|
|
|
jobs:
|
|
eslint-and-prettier:
|
|
runs-on: ubuntu-22.04
|
|
|
|
steps:
|
|
- name: checkout
|
|
uses: actions/checkout@v3
|
|
|
|
- name: setup environment
|
|
uses: ./.github/actions/setup
|
|
|
|
- name: lint .env.template files
|
|
run: pnpm lint:env-template
|
|
|
|
- name: eslint cache
|
|
uses: actions/cache@v3
|
|
with:
|
|
path: '.eslintcache'
|
|
key: ${{ runner.os }}-eslint-${{ hashFiles('pnpm-lock.yaml') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-eslint
|
|
|
|
- name: eslint
|
|
id: eslint
|
|
run: pnpm lint
|
|
env:
|
|
TIMING: 'true'
|
|
DEBUG: 'eslint:cli-engine'
|
|
|
|
- name: eslint tip
|
|
if: ${{ steps.eslint.outcome }} == 'failure'
|
|
run: echo "Run pnpm lint --fix"
|
|
|
|
- name: prettier
|
|
id: prettier
|
|
run: pnpm lint:prettier
|
|
|
|
- name: eslint tip
|
|
if: ${{ steps.prettier.outcome }} == 'failure'
|
|
run: echo "Run pnpm format"
|
|
|
|
- name: Generate Types
|
|
run: yarn graphql:generate
|
|
|
|
- name: Operation Check
|
|
run: |
|
|
npx graphql-inspector validate \
|
|
"packages/web/app/**/*.graphql|packages/libraries/cli/**/*.graphql|packages/web/app/**/*.ts(x)" \
|
|
"packages/**/module.graphql.ts" \
|
|
--maxDepth=20 \
|
|
--maxAliasCount=20 \
|
|
--maxDirectiveCount=20 \
|
|
--maxTokenCount=800
|