From 68b206fd0940bfee609993f032926ad0fed06ebd Mon Sep 17 00:00:00 2001 From: Bill Thornton Date: Tue, 6 Aug 2024 14:01:22 -0400 Subject: [PATCH 1/2] Add workflow to run integration tests weekly --- .github/workflows/test-integration.yaml | 29 +++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 .github/workflows/test-integration.yaml diff --git a/.github/workflows/test-integration.yaml b/.github/workflows/test-integration.yaml new file mode 100644 index 000000000..e5aaf839e --- /dev/null +++ b/.github/workflows/test-integration.yaml @@ -0,0 +1,29 @@ +name: Integration Test + +on: + schedule: + - cron: '15 8 * * 1' + workflow_dispatch: + +jobs: + test: + + name: Test + runs-on: ubuntu-latest + + steps: + - name: Check out Git repository + uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 + + - name: Set up Node.js + uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3 + with: + node-version: 20 + check-latest: true + cache: npm + + - name: Install Node.js dependencies + run: npm ci --no-audit + + - name: Run Vitest + run: npx vitest **/integration.test.ts From 554c1aaa5eeca5e55150d342ac4e6818a8111552 Mon Sep 17 00:00:00 2001 From: Bill Thornton Date: Tue, 6 Aug 2024 15:56:30 -0400 Subject: [PATCH 2/2] Add integration test npm script --- .github/workflows/test-integration.yaml | 2 +- package.json | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test-integration.yaml b/.github/workflows/test-integration.yaml index e5aaf839e..20eeb57ed 100644 --- a/.github/workflows/test-integration.yaml +++ b/.github/workflows/test-integration.yaml @@ -26,4 +26,4 @@ jobs: run: npm ci --no-audit - name: Run Vitest - run: npx vitest **/integration.test.ts + run: npm run test:integration diff --git a/package.json b/package.json index 7f90d904a..a88ea3810 100644 --- a/package.json +++ b/package.json @@ -22,7 +22,8 @@ "fix-schema": "node scripts/modify-schema.mjs openapi.json", "lint": "eslint \".\"", "prepublishOnly": "npm run clean:build:sdk", - "test": "vitest --exclude **/integration.test.ts" + "test": "vitest --exclude **/integration.test.ts", + "test:integration": "vitest integration" }, "devDependencies": { "@openapitools/openapi-generator-cli": "2.13.4",