From 4db7075f1cc73ce9c127ba3ab3474d73d8481b4a Mon Sep 17 00:00:00 2001 From: Naily Date: Fri, 1 Nov 2024 17:45:32 +0800 Subject: [PATCH] ci: test --- .github/workflows/test.yml | 2 +- package.json | 4 +++- pnpm-lock.yaml | 12 ++++++++++++ 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 20e3e2a..f6c5ddc 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -40,4 +40,4 @@ jobs: # Step 5: Run tests for all packages - name: Run tests run: | - pnpm run test + pnpm run test:actions diff --git a/package.json b/package.json index 5a9f341..bd819a3 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,8 @@ "build:ioc": "pnpm -F @nailyjs/ioc build", "lint": "eslint .", "postinstall": "npx simple-git-hooks", - "test": "vitest --ui --coverage" + "test": "vitest --ui --coverage", + "test:actions": "cross-env GITHUB_ACTIONS=true vitest --ui --coverage" }, "devDependencies": { "@antfu/eslint-config": "^3.7.3", @@ -22,6 +23,7 @@ "@vitest/coverage-v8": "^2.1.4", "@vitest/ui": "2.1.4", "bumpp": "^9.7.1", + "cross-env": "^7.0.3", "eslint": "^9.12.0", "js-yaml": "^4.1.0", "lint-staged": "^15.2.10", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index a24f238..5004d70 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -29,6 +29,9 @@ importers: bumpp: specifier: ^9.7.1 version: 9.8.0(magicast@0.3.5) + cross-env: + specifier: ^7.0.3 + version: 7.0.3 eslint: specifier: ^9.12.0 version: 9.13.0(jiti@1.21.6) @@ -1253,6 +1256,11 @@ packages: core-js-compat@3.38.1: resolution: {integrity: sha512-JRH6gfXxGmrzF3tZ57lFx97YARxCXPaMzPo6jELZhv88pBH5VXpQ+y0znKGlFnzuaihqhLbefxSJxWJMPtfDzw==} + cross-env@7.0.3: + resolution: {integrity: sha512-+/HKd6EgcQCJGh2PSjZuUitQBQynKor4wrFbRg4DtAgS1aWO+gU52xpH7M9ScGgXSYmAVS9bIJ8EzuaGw0oNAw==} + engines: {node: '>=10.14', npm: '>=6', yarn: '>=1'} + hasBin: true + cross-spawn@7.0.3: resolution: {integrity: sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==} engines: {node: '>= 8'} @@ -3797,6 +3805,10 @@ snapshots: dependencies: browserslist: 4.24.2 + cross-env@7.0.3: + dependencies: + cross-spawn: 7.0.3 + cross-spawn@7.0.3: dependencies: path-key: 3.1.1