From 925526cb412f7cad4c9813cf14ea7e08ef2f2911 Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Mon, 2 Nov 2026 22:21:12 +0000 Subject: [PATCH 1/2] ci: run unit tests and typecheck on pull requests and main The integration job is the only test check, and it does not run on pushes to main. Add a secret-free CI workflow for npm run test:unit and npm run test:types. TypeScript 7 removed baseUrl, which made the existing typecheck script fail. Drop that option so the types job can pass. Co-authored-by: ProxyMesh AI --- .github/workflows/ci.yml | 50 ++++++++++++++++++++++++++++++++++++++++ tsconfig.json | 1 - 2 files changed, 50 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..0c1d7d8 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,50 @@ +# Unit tests and typecheck. No secrets. +# Real-proxy integration stays in proxy_integration_tests.yml (needs PROXY_URL). + +name: CI + +on: + pull_request: + push: + branches: + - main + +permissions: + contents: read + +jobs: + unit: + runs-on: ubuntu-24.04 + steps: + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + persist-credentials: false + + - name: Set up Node + uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0 + with: + node-version: "22" + + - name: Install dependencies + run: npm ci + + - name: Unit tests + run: npm run test:unit + + types: + runs-on: ubuntu-24.04 + steps: + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + persist-credentials: false + + - name: Set up Node + uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0 + with: + node-version: "22" + + - name: Install dependencies + run: npm ci + + - name: Typecheck + run: npm run test:types diff --git a/tsconfig.json b/tsconfig.json index 3eae74c..060ca51 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -9,7 +9,6 @@ "forceConsistentCasingInFileNames": true, "esModuleInterop": true, "lib": ["ES2020", "DOM"], - "baseUrl": ".", "paths": { "javascript-proxy-headers": ["./types/index.d.ts"], "javascript-proxy-headers/axios": ["./types/axios.d.ts"], From 2489ea39fc3672d4efdbfa66180943eee9d3ec27 Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Mon, 2 Nov 2026 22:22:42 +0000 Subject: [PATCH 2/2] ci: typecheck in the integration job before proxy tests Drop the separate workflow. Unit tests already run after install; add the typecheck step beside them, before the PROXY_URL check. Co-authored-by: ProxyMesh AI --- .github/workflows/ci.yml | 50 ------------------- .github/workflows/proxy_integration_tests.yml | 3 ++ 2 files changed, 3 insertions(+), 50 deletions(-) delete mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml deleted file mode 100644 index 0c1d7d8..0000000 --- a/.github/workflows/ci.yml +++ /dev/null @@ -1,50 +0,0 @@ -# Unit tests and typecheck. No secrets. -# Real-proxy integration stays in proxy_integration_tests.yml (needs PROXY_URL). - -name: CI - -on: - pull_request: - push: - branches: - - main - -permissions: - contents: read - -jobs: - unit: - runs-on: ubuntu-24.04 - steps: - - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - persist-credentials: false - - - name: Set up Node - uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0 - with: - node-version: "22" - - - name: Install dependencies - run: npm ci - - - name: Unit tests - run: npm run test:unit - - types: - runs-on: ubuntu-24.04 - steps: - - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - persist-credentials: false - - - name: Set up Node - uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0 - with: - node-version: "22" - - - name: Install dependencies - run: npm ci - - - name: Typecheck - run: npm run test:types diff --git a/.github/workflows/proxy_integration_tests.yml b/.github/workflows/proxy_integration_tests.yml index a00991c..d71f2c0 100644 --- a/.github/workflows/proxy_integration_tests.yml +++ b/.github/workflows/proxy_integration_tests.yml @@ -34,6 +34,9 @@ jobs: - name: Run unit tests run: npm run test:unit + - name: Run typecheck + run: npm run test:types + - name: Require PROXY_URL Actions secret env: PROXY_URL: ${{ secrets.PROXY_URL }}