Skip to content

Update ci.yml

Update ci.yml #8

Workflow file for this run

name: Test Coverage
on:
push:
branches: [ master, develop ]
pull_request:
branches: [ master, develop ]
jobs:
test-coverage:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x, 20.x]
package-manager: [pnpm]
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 10.13.1
- name: Setup Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: ${{ matrix.package-manager }}
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Run tests with coverage
run: pnpm test:coverage
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v4
with:
file: ./coverage/lcov.info
flags: unittests
name: codecov-umbrella
fail_ci_if_error: false
- name: Upload test results
uses: actions/upload-artifact@v4
if: always()
with:
name: test-results-${{ matrix.node-version }}
path: |
coverage/
test-results/
retention-days: 30