From 98b7d554e4bc9ae4fa1c439eca7fda85f7f4a66c Mon Sep 17 00:00:00 2001 From: Terry L Date: Mon, 27 Nov 2023 17:25:54 +0800 Subject: [PATCH] Merge 4.x to master (#45) * First commit to 4.x * Modify codecov config. * Test github action (#44) * Test github action * Test github action * Test github action. * Modify vitest config. --- .github/workflows/release.yml | 10 ++++++++++ .github/workflows/testing.yml | 9 ++++++++- vitest.config.ts | 2 +- 3 files changed, 19 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 0b9f25a..6aca895 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -34,6 +34,16 @@ jobs: name: dist path: dist/ + - name: Archive production artifacts + run: zip -r dist.zip dist/ + + - name: Upload dist to Release + uses: softprops/action-gh-release@v1 + with: + files: dist/* + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Commit and push run: | git config --global user.name 'GitHub Action' diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index 01adf28..c16c166 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -26,5 +26,12 @@ jobs: run: npm install - name: Run tests and collect coverage run: npm run coverage + - name: List coverage directory + run: ls -l coverage/ - name: Upload coverage to Codecov - uses: codecov/codecov-action@v3 \ No newline at end of file + uses: codecov/codecov-action@v3 + with: + token: ${{ secrets.CODECOV_TOKEN }} + directory: ./coverage/ + verbose: true + \ No newline at end of file diff --git a/vitest.config.ts b/vitest.config.ts index 6a64be7..59a87dc 100644 --- a/vitest.config.ts +++ b/vitest.config.ts @@ -9,7 +9,7 @@ export default defineConfig({ setupFiles: [resolve(__dirname, 'vitest.setup.ts')], coverage: { provider: 'v8', - reporter: ['text', 'html'], + reporter: ['text', 'html', 'json'], }, }, });