diff --git a/.changeset/config.json b/.changeset/config.json index b37fa58..1aefad7 100644 --- a/.changeset/config.json +++ b/.changeset/config.json @@ -1,10 +1,10 @@ { "$schema": "https://unpkg.com/@changesets/config@3.1.1/schema.json", - "changelog": "@changesets/cli/changelog", - "commit": false, + "changelog": ["@changesets/changelog-github", { "repo": "npmrun/xyx-utils" }], + "commit": true, "fixed": [], "linked": [], - "access": "restricted", + "access": "public", "baseBranch": "main", "updateInternalDependencies": "patch", "ignore": [ diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..fe5cd35 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,34 @@ +name: CI + +on: + push: + branches: [main] + pull_request: + branches: [main] + +jobs: + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - uses: pnpm/action-setup@v2 + with: + version: 8 + + - uses: actions/setup-node@v3 + with: + node-version: 20 + cache: 'pnpm' + + - name: Install dependencies + run: pnpm install + + - name: Run tests + run: pnpm test + + - name: Check coverage + run: pnpm run coverage + + - name: Build packages + run: pnpm build \ No newline at end of file diff --git a/package.json b/package.json index c67f884..7e8bd7d 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,11 @@ "type": "module", "name": "xyx-utils", "version": "1.0.0", - "description": "", + "description": "一个模块化的工具库集合", + "repository": { + "type": "git", + "url": "https://github.com/npmrun/xyx-utils" + }, "scripts": { "build": "tsx scripts/build.mts build", "dev": "tsx scripts/build.mts dev", diff --git a/vitest.shared.ts b/vitest.shared.ts index c65aa2d..842b89b 100644 --- a/vitest.shared.ts +++ b/vitest.shared.ts @@ -30,7 +30,14 @@ export default defineConfig({ "packages/node/src/**", "packages/xyx-utils/src/**", ], - exclude: [...coverageConfigDefaults.exclude, "packages/**/docs/**", "packages/**\/test?(s)/**"] + exclude: [...coverageConfigDefaults.exclude, "packages/**/docs/**", "packages/**\/test?(s)/**"], + thresholds: { + branches: 80, + functions: 80, + lines: 80, + statements: 80 + } }, + testTimeout: 10000 }, });