Skip to content

Backend testing updates #50

Backend testing updates

Backend testing updates #50

name: Codecov Coverage
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
Frontend-Codecov-Publishing:
runs-on: ubuntu-latest
steps:
# Checkout code
- name: Checkout code
uses: actions/checkout@v2
# Setup Node environment
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 18
# Restore dependencies
- name: Install dependencies
run: npm install
working-directory: ./frontend
# Build the project
- name: Build
run: npm run build
working-directory: ./frontend
# Step 5: Run tests and collect code coverage
- name: Test and calculate coverage
run: npm run test:coverage
working-directory: ./frontend
# Step 6: Upload the code coverage report to Codecov
- name: Upload coverage to Codecov
uses: codecov/[email protected]
with:
token: ${{ secrets.CODECOV_TOKEN }}
# files: ./frontend/coverage/lcov.info, ./ManualCoverageBackend.cobertura.xml
flags: frontend
fail_ci_if_error: true
Backend-Codecov-Publishing:
runs-on: ubuntu-latest
steps:
# Upload backend coverage to Codecov, must generate report locally
- name: Upload backend coverage to Codecov
uses: codecov/[email protected]
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./ManualCoverageBackend.cobertura.xml
flags: backend
fail_ci_if_error: true