Skip to content

[feat] update git workflows #3

[feat] update git workflows

[feat] update git workflows #3

Workflow file for this run

name: Test & Coverage
on:
pull_request:
branches: [main, develop]
push:
branches: [main, develop]
workflow_dispatch:
workflow_call:
jobs:
test:
name: Run Tests with Coverage
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "20"
cache: "npm"
- name: Install dependencies
run: npm ci
- name: Run tests with coverage
run: npm run test:coverage
- name: Vitest Coverage Report
uses: davelosert/vitest-coverage-report-action@v2
if: github.event_name == 'pull_request'
with:
json-summary-path: ./coverage/coverage-summary.json
json-final-path: ./coverage/coverage-final.json
vite-config-path: ./vite.config.ts
- name: Archive coverage report
uses: actions/upload-artifact@v4
if: always()
with:
name: coverage-report-${{ github.sha }}
path: coverage/
retention-days: 30