From e05c4eddb5518b9a81a21b53da0b7e076f301426 Mon Sep 17 00:00:00 2001 From: jugglinmike Date: Thu, 23 Jan 2025 16:05:37 -0500 Subject: [PATCH] Validate types in CI (#45) * Validate types in CI * fixup! Validate types in CI * fixup! Validate types in CI --- .github/workflows/self-test.yml | 20 ++++++++++++++++++++ stressor/package.json | 3 ++- 2 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/self-test.yml diff --git a/.github/workflows/self-test.yml b/.github/workflows/self-test.yml new file mode 100644 index 0000000..cb4008f --- /dev/null +++ b/.github/workflows/self-test.yml @@ -0,0 +1,20 @@ +name: Run the project's self-tests +on: [push] + +jobs: + runtest_task: + name: Validate TypeScript types + runs-on: ubuntu-24.04 + steps: + - name: Checkout the repository + uses: actions/checkout@v4 + - name: Install NodeJS 20 + uses: actions/setup-node@v4 + with: + node-version: '20' + cache: 'npm' + - run: npm ci + working-directory: ./stressor + - name: Test types + run: npm run test-types + working-directory: ./stressor diff --git a/stressor/package.json b/stressor/package.json index 06d6e02..b4a95f9 100644 --- a/stressor/package.json +++ b/stressor/package.json @@ -4,7 +4,8 @@ "description": "Stress test Test Plans via CI workflows", "main": "stress-test.mts", "scripts": { - "cancel-runs": "tsx cancel-all-workflows.mts" + "cancel-runs": "tsx cancel-all-workflows.mts", + "test-types": "tsc --noEmit" }, "author": "", "license": "MIT",