Skip to content

test: expand backend coverage to 93% and wire up Codecov #55

test: expand backend coverage to 93% and wire up Codecov

test: expand backend coverage to 93% and wire up Codecov #55

Workflow file for this run

name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
jobs:
build-and-test:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20, 22]
steps:
- uses: actions/checkout@v4
- name: Setup Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: npm
cache-dependency-path: |
package-lock.json
webview-ui/package-lock.json
- name: Install dependencies
run: npm ci
- name: Install webview dependencies
run: cd webview-ui && npm ci
- name: Type check (extension)
run: npm run lint
- name: Type check (webview)
run: cd webview-ui && npm run check
- name: Run tests with coverage
run: npx vitest run --coverage
- name: Upload coverage to Codecov
if: matrix.node-version == 22
uses: codecov/codecov-action@v5
with:
files: ./coverage/lcov.info
fail_ci_if_error: false
token: ${{ secrets.CODECOV_TOKEN }}
- name: Build extension
run: npm run build:extension
- name: Build webview
run: npm run build:webview