Skip to content

Commit 1485b96

Browse files
committed
chore(ci): add examples/codegen-integration and clean workflows (remove ignores; separate examples job)
1 parent 6cce350 commit 1485b96

8 files changed

Lines changed: 73 additions & 10 deletions

File tree

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Examples Integration
2+
on:
3+
pull_request:
4+
branches: [ main, v1 ]
5+
paths:
6+
- 'examples/**'
7+
- 'graphql/codegen/**'
8+
workflow_dispatch:
9+
10+
jobs:
11+
examples-types:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v4
15+
- uses: actions/setup-node@v4
16+
with:
17+
node-version: '20'
18+
- uses: pnpm/action-setup@v2
19+
with:
20+
version: 10
21+
- run: pnpm install
22+
- run: pnpm -r --filter @constructive-io/examples-codegen-integration run test:types

.github/workflows/notify-e2e.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,6 @@ name: Notify E2E Tests
66
on:
77
push:
88
branches: [main]
9-
paths-ignore:
10-
- 'graphql/test-app/**'
11-
- 'graphql/test-codegen-app/**'
129

1310
jobs:
1411
trigger-tests:

.github/workflows/run-tests.yaml

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,10 @@ on:
44
branches:
55
- main
66
- v1
7-
paths-ignore:
8-
- 'graphql/test-app/**'
9-
- 'graphql/test-codegen-app/**'
107
pull_request:
118
branches:
129
- main
1310
- v1
14-
paths-ignore:
15-
- 'graphql/test-app/**'
16-
- 'graphql/test-codegen-app/**'
1711
workflow_dispatch:
1812
workflow_call:
1913

@@ -197,7 +191,7 @@ jobs:
197191

198192
- name: build
199193
run: |
200-
pnpm -r --filter '!@constructive-io/test-codegen-app' run build
194+
pnpm -r --filter '!./examples/**' run build
201195
202196
- name: seed app_user
203197
run: |
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import { defineConfig } from "@constructive-io/graphql-codegen";
2+
3+
export default defineConfig({
4+
endpoint: "http://example.local/graphql", // not used for fixture run
5+
output: "src/generated",
6+
reactQuery: true,
7+
orm: true,
8+
codegen: {
9+
maxFieldDepth: 2,
10+
skipQueryField: true
11+
},
12+
// Use the example schema fixtures baked into the repo
13+
schemaFile: "../../graphql/codegen/examples/example.schema.graphql"
14+
});
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"name": "@constructive-io/examples-codegen-integration",
3+
"version": "0.0.0",
4+
"private": true,
5+
"type": "module",
6+
"scripts": {
7+
"codegen": "tsx ../../graphql/codegen/src/cli/index.ts --config codegen.config.ts",
8+
"test:types": "pnpm run codegen && tsc --noEmit"
9+
},
10+
"dependencies": {
11+
"graphql": "15.10.1"
12+
},
13+
"devDependencies": {
14+
"@constructive-io/graphql-codegen": "workspace:^",
15+
"@constructive-io/graphql-types": "workspace:^",
16+
"tsx": "^4.20.3",
17+
"typescript": "^5.1.6"
18+
}
19+
}
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
// Placeholder file so tsc has something to include
2+
export {};
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"compilerOptions": {
3+
"target": "ES2022",
4+
"module": "ESNext",
5+
"moduleResolution": "Bundler",
6+
"strict": true,
7+
"jsx": "react-jsx",
8+
"skipLibCheck": true,
9+
"noEmit": true,
10+
"baseUrl": ".",
11+
"paths": {}
12+
},
13+
"include": ["src", "codegen.config.ts"]
14+
}

pnpm-workspace.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ packages:
22
- 'packages/*'
33
- 'pgpm/*'
44
- 'graphql/*'
5+
- 'examples/*'
56
- 'uploads/*'
67
- 'postgres/*'
78
- 'graphile/*'

0 commit comments

Comments
 (0)