-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add GitHub Action for typeschecking in CI
This involved a bunch of flaililng until I followed links from a issue to this merged PR: https://github.com/gatsbyjs/gatsby/pull/36405/files#diff-9b4482a4b0c980ba8a14df389f19ca9f9cc347b0e9b2e2ea54e8c516e92cb27e Make the option in gatsby-config an object and then there is a property to generate types on build (which is needed to use in CI). fix: typechecking needs some files from build fix: Adjust npm typecheck script fix: Run build not build-pages in typescript workflow fix: add debugging step for types in GH Actions fix: try again to build types in CI fix: found the option to generate types for build 🫠 fix: whoops, deleted build step by accident
- Loading branch information
1 parent
c1085ff
commit cbdb0d6
Showing
4 changed files
with
78 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
name: Run Typescript Checks | ||
|
||
on: | ||
pull_request: | ||
branches: [main] | ||
workflow_dispatch: | ||
secrets: | ||
AIRTABLE_TOKEN: | ||
required: true | ||
|
||
jobs: | ||
typescript-check: | ||
runs-on: ubuntu-latest | ||
env: | ||
AIRTABLE_TOKEN: ${{ secrets.AIRTABLE_TOKEN }} | ||
AIRTABLE_PEOPLE_BASE_ID: appk2btw36qEO3vFo | ||
AIRTABLE_RESEARCH_BASE_ID: appTv9J1zxqaNgBHi | ||
AIRTABLE_EVENTS_BASE_ID: tbl6CURONRn8ML6le | ||
AIRTABLE_POSTS_BASE_ID: appsY0VXF7pbv3mKR | ||
AIRTABLE_MITH_BASE_ID: appMWsw8HKjjokBg2 | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20.x | ||
- name: Install dependencies and build | ||
run: | | ||
npm ci | ||
npm run build | ||
- name: Check for gatsby-types.d.ts | ||
run: | | ||
ls -l src/gatsby-types.d.ts | ||
cat src/gatsby-types.d.ts | head -n 20 | ||
- name: Run TypeScript check | ||
run: npm run check |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters