Release5 UI Changes #58
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 .NET 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/codecov-action@v4 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} # Add the Codecov token in the GitHub secrets | |
files: ./frontend/coverage/lcov.info # Ensure the correct path for the coverage file | |
flags: vite-tests | |
fail_ci_if_error: true | |
# # Setup .NET environment | |
# - name: Setup .NET | |
# uses: actions/setup-dotnet@v3 | |
# with: | |
# context: ./backend | |
# dotnet-version: 6.0.x # Use the version your project requires | |
# # Restore dependencies | |
# - name: Restore dependencies | |
# run: dotnet restore ./backend | |
# # Build the project | |
# - name: Build | |
# run: dotnet build ./backend --no-restore | |
# # Step 5: Run tests and collect code coverage | |
# - name: Test and calculate coverage | |
# run: | | |
# dotnet test ./backend --no-build --verbosity normal --logger "console;verbosity=detailed" \ | |
# /p:CollectCoverage=true /p:CoverletOutputFormat=cobertura | |
# /p:CoverletOutput=./TestResults/coverage.cobertura.xml | |
# # Step 6: Upload the code coverage report to Codecov | |
# - name: Upload coverage to Codecov | |
# uses: codecov/codecov-action@v4 | |
# with: | |
# context: ./backend | |
# token: ${{ secrets.CODECOV_TOKEN }} # Add the Codecov token in the GitHub secrets | |
# files: ./TestResults/coverage.opencover.xml # Ensure the correct path for the coverage file | |
# flags: unittests | |
# fail_ci_if_error: true |