feat: add workflow of UT coverage #2
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
name: CI | |
on: | |
push: | |
branches: | |
- release/refactor-3.0.0 | |
pull_request: | |
branches: | |
- release/refactor-3.0.0 | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
package: [utils] | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Set up Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '16' | |
- name: Install dependencies | |
run: pnpm i | |
- name: Run tests with coverage | |
run: | | |
cd packages/${{ matrix.package }} | |
pnpm test:coverage | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v3 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
files: packages/${{ matrix.package }}/coverage/lcov.info | |
flags: unittests | |
name: codecov-umbrella |