otiai10/chromite

View on GitHub
.github/workflows/coverage.yml

Summary

Maintainability
Test Coverage
name: Coverage

on:
  push:
    branches: [ "main" ]
  pull_request:
    branches: [ "main" ]

jobs:
  coverage:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        node-version: [20.x]
    steps:
    - uses: actions/checkout@v4
    - name: Use Node.js ${{ matrix.node-version }}
      uses: actions/setup-node@v4
      with:
        node-version: ${{ matrix.node-version }}
        cache: 'npm'
    - run: npm install
    - run: npm run build --if-present
    - run: npm test -- --coverage
    - name: Codecov
      uses: codecov/codecov-action@v3.1.2