Skip to content

Vue3 migration

Vue3 migration #6789

Workflow file for this run

name: Test and Coverage
on: [ push, pull_request ]
# CRITICAL: Give the action permission to write PR comments
permissions:
pull-requests: write
contents: read
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20.x'
# Optional: Speeds up the workflow
cache: 'npm'
- name: Install Dependencies
# 'npm ci' is strictly better than 'npm install' for pipelines
run: npm ci
# 1. Run the test script
- name: Run Tests with Coverage
run: npm run test:coverage
# 2. Add the PR Comment Action
- name: Report Coverage in PR
if: always() # Run even if coverage drops below 90%
uses: davelosert/vitest-coverage-report-action@v2
# 3. Upload to Coveralls
# This uses the official Codacy Action
- name: Update coverage to coveralls
if: always() # CRITICAL: Uploads report even if the 90% threshold fails
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: './coverage/lcov.info'
# 3. Upload to Codacy
# This uses the official Codacy Action
- name: Run Codacy Coverage Reporter
if: always() # CRITICAL: Uploads report even if the 90% threshold fails
uses: codacy/codacy-coverage-reporter-action@v1
with:
project-token: ${{ secrets.CODACY_PROJECT_TOKEN }}
coverage-reports: coverage/lcov.info