Skip to content

Add PR workflow comment #11

Add PR workflow comment

Add PR workflow comment #11

Workflow file for this run

name: Code Coverage
on:
pull_request:
branches: [ main, prod-beta, prod-stable, stage-beta, stage-stable ]
push:
branches: [ main, prod-beta, prod-stable, stage-beta, stage-stable ]
env:
BRANCH: ${{ github.base_ref }}
jobs:
build:
name: koku-ui codecov
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18]
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Cache node modules
id: cache-npm
uses: actions/cache@v4
env:
cache-name: cache-node-modules
with:
# npm cache files are stored in `~/.npm` on Linux/macOS
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: Install dependencies
run: npm install
- name: Test
run: npm test -- --collect-coverage --max-workers=4
- name: Upload coverage report
if: ${{ success() }}
uses: codecov/codecov-action@v4.2.0
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
directory: coverage
plugin: pycoverage # Only run one plugin so that all do not run. There is no way to disable plugins entirely.