Skip to content

Feature/ei 315

Feature/ei 315 #987

name: Codecov Frontend
on:
push:
branches-ignore:
- 'dependabot/**'
- 'renovate/**'
paths:
- 'endpoint-insights-ui/**'
- '.github/workflows/codecov-frontend.yaml'
pull_request:
paths:
- 'endpoint-insights-ui/**'
- '.github/workflows/codecov-frontend.yaml'
jobs:
test:
runs-on: ubuntu-latest
defaults:
run:
working-directory: endpoint-insights-ui
steps:
- name: 'Harden Runner'
uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1
with:
egress-policy: audit
- name: Checkout
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- name: Set up Node.js
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
with:
node-version: '20'
cache: 'npm'
cache-dependency-path: endpoint-insights-ui/package-lock.json
- name: Install dependencies
run: npm ci
- name: Run tests and collect coverage
run: npm test -- --watch=false --code-coverage --browsers=ChromeHeadless
- name: Upload coverage to Codecov
uses: codecov/codecov-action@5a1091511ad55cbe89839c7260b706298ca349f7
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
directory: ./endpoint-insights-ui/coverage
flags: frontend
name: codecov-frontend
fail_ci_if_error: true