From 1ef2d40acf1b4ff3c842502911eba853a15c4ce6 Mon Sep 17 00:00:00 2001 From: Matt Apperson Date: Mon, 27 Oct 2025 21:18:22 -0400 Subject: [PATCH 1/4] ci: add typecheck validation for tests and examples Add comprehensive TypeScript type checking to the Speakeasy PR workflow: - Typecheck all files in tests/ directory - Typecheck examples root directory - Typecheck examples/nextjs-example project - Build SDK before running typechecks to ensure examples can import correctly This ensures all TypeScript code passes type validation before changes are committed. --- .github/workflows/speakeasy_run_on_pr.yaml | 31 ++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/.github/workflows/speakeasy_run_on_pr.yaml b/.github/workflows/speakeasy_run_on_pr.yaml index 4741b7f6..aabc92a4 100644 --- a/.github/workflows/speakeasy_run_on_pr.yaml +++ b/.github/workflows/speakeasy_run_on_pr.yaml @@ -30,6 +30,37 @@ jobs: - name: Run Speakeasy run: speakeasy run + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: '20' + cache: 'npm' + + - name: Install dependencies + run: npm install + + - name: Build SDK + run: npm run build + + - name: Typecheck tests directory + run: npx tsc --noEmit --skipLibCheck --esModuleInterop --moduleResolution node --module esnext --target es2020 'tests/**/*.ts' + + - name: Install examples dependencies + working-directory: examples + run: npm install + + - name: Typecheck examples root + working-directory: examples + run: npx tsc --noEmit --skipLibCheck --esModuleInterop --moduleResolution node --module esnext --target es2020 '*.ts' + + - name: Install nextjs-example dependencies + working-directory: examples/nextjs-example + run: npm install + + - name: Typecheck nextjs-example + working-directory: examples/nextjs-example + run: npx tsc --noEmit + - name: Commit changes run: | git config --global user.name 'github-actions[bot]' From 84b527b0e52f6bc51447ece6502286375920860f Mon Sep 17 00:00:00 2001 From: Matt Apperson Date: Mon, 27 Oct 2025 21:20:31 -0400 Subject: [PATCH 2/4] test --- .github/workflows/speakeasy_run_on_pr.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/speakeasy_run_on_pr.yaml b/.github/workflows/speakeasy_run_on_pr.yaml index aabc92a4..f3cc745c 100644 --- a/.github/workflows/speakeasy_run_on_pr.yaml +++ b/.github/workflows/speakeasy_run_on_pr.yaml @@ -7,8 +7,8 @@ permissions: on: workflow_dispatch: pull_request: - paths: - - .speakeasy/in.openapi.yaml + # paths: + # - .speakeasy/in.openapi.yaml jobs: run-speakeasy: From dba358b2089111593349ab62249f34efad1d366b Mon Sep 17 00:00:00 2001 From: Matt Apperson Date: Mon, 27 Oct 2025 21:22:00 -0400 Subject: [PATCH 3/4] un-test --- .github/workflows/speakeasy_run_on_pr.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/speakeasy_run_on_pr.yaml b/.github/workflows/speakeasy_run_on_pr.yaml index f3cc745c..aabc92a4 100644 --- a/.github/workflows/speakeasy_run_on_pr.yaml +++ b/.github/workflows/speakeasy_run_on_pr.yaml @@ -7,8 +7,8 @@ permissions: on: workflow_dispatch: pull_request: - # paths: - # - .speakeasy/in.openapi.yaml + paths: + - .speakeasy/in.openapi.yaml jobs: run-speakeasy: From 6cf1545789dab9b00477b6cfef584c904e84c3d9 Mon Sep 17 00:00:00 2001 From: Matt Apperson Date: Mon, 27 Oct 2025 21:25:33 -0400 Subject: [PATCH 4/4] pin to 22 --- .github/workflows/speakeasy_run_on_pr.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/speakeasy_run_on_pr.yaml b/.github/workflows/speakeasy_run_on_pr.yaml index aabc92a4..e1ff6400 100644 --- a/.github/workflows/speakeasy_run_on_pr.yaml +++ b/.github/workflows/speakeasy_run_on_pr.yaml @@ -33,7 +33,7 @@ jobs: - name: Setup Node.js uses: actions/setup-node@v4 with: - node-version: '20' + node-version: '22' cache: 'npm' - name: Install dependencies