-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(ci): π· coverage action (#907)
* chore(ci): π· coverage action * chore(actions): π· split yml * chore(ci-coverage): π· continue-on-error when doing coverage * chore(scripts): π§ add scripts.cov for coverage * refactor: π₯ remove coverage github action * Revert "refactor: π₯ remove coverage github action" This reverts commit 9a683dd82c4abb405243b663074b685c0b6c0204. * feat: β¨ using codecov service
- Loading branch information
1 parent
295d494
commit 619bead
Showing
4 changed files
with
81 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
name: Coverage | ||
|
||
env: | ||
NODE_OPTIONS: --max-old-space-size=6144 | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
paths-ignore: | ||
- 'examples/**' | ||
- 'docs/**' | ||
- '**/*.md' | ||
pull_request: | ||
types: | ||
- 'opened' | ||
- 'synchronize' | ||
workflow_dispatch: | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
coverage: | ||
permissions: | ||
checks: write | ||
pull-requests: write | ||
contents: read | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
node-version: [16.x] | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
- name: Use Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 16.x | ||
registry-url: 'https://registry.npmjs.org/' | ||
|
||
- name: Install pnpm | ||
uses: pnpm/action-setup@v2.2.2 | ||
with: | ||
run_install: false | ||
|
||
- name: Get pnpm store directory | ||
id: pnpm-cache | ||
run: | | ||
echo "::set-output name=pnpm_cache_dir::$(pnpm store path)" | ||
- uses: actions/cache@v3 | ||
name: Setup pnpm cache | ||
with: | ||
path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }} | ||
key: ${{ runner.os }}-pnpm-store-node-jest-${{ matrix.node-version }}-${{ hashFiles('**/pnpm-lock.yaml') }} | ||
restore-keys: | | ||
${{ runner.os }}-pnpm-store-node-jest-${{ matrix.node-version }}- | ||
- run: pnpm install | ||
|
||
- run: pnpm build | ||
|
||
- name: Run tests | ||
run: pnpm run cov | ||
|
||
- name: Upload coverage to Codecov | ||
uses: codecov/codecov-action@v3 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters