Skip to content

Commit

Permalink
ci: fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
Carrotzpc committed Mar 18, 2024
1 parent 04217be commit 0f96385
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 4 deletions.
1 change: 1 addition & 0 deletions .github/workflows/deploy-ghpages.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: Deploy to GitHub Pages

on:
# https://docs.github.com/zh/actions/using-workflows/events-that-trigger-workflows#workflow_run
workflow_run:
workflows:
- 'Build and Release'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Build and Release
on:
push:
branches:
- '*'
- 'main'

jobs:
release:
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/test-i18n-extract.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,9 @@ jobs:
run: pnpm i

- name: Test
run: cd packages/lowcode-i18n-extract && npm run test
run: cd packages/lowcode-i18n-extract && npm run test:cov

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
directory: ./packages/lowcode-i18n-extract/coverage/
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"build": "dumi build",
"dev": "dumi dev",
"dev:i18n-extract": "concurrently \"pnpm --filter 'lowcode-i18n-extract' dev\" \"npm run dev\"",
"lint": "npm run lint:es && npm run lint:style && nr lint:md",
"lint": "npm run lint:es && npm run lint:style && npm run lint:md",
"lint-fix": "npm run lint-fix:es && npm run lint-fix:style",
"lint-fix:es": "eslint \"{docs,packages}/**/*.{js,jsx,ts,tsx}\" --fix",
"lint-fix:style": "stylelint \"{docs,packages}/**/*.{css,less,js,jsx,ts,tsx}\" --fix",
Expand Down
2 changes: 1 addition & 1 deletion packages/lowcode-i18n-extract/tests/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,5 @@ test('extract chinese text to i18n from schema', async () => {
);

// Assert 断言测试结果
expect(matches.length).toBe(16);
expect(matches.length).toBe(17);
});

0 comments on commit 0f96385

Please sign in to comment.