Skip to content

fix(ci): correct codecov.yml field name #109

fix(ci): correct codecov.yml field name

fix(ci): correct codecov.yml field name #109

Workflow file for this run

name: CI
on:
push:
branches: [ main, develop ]
pull_request:
branches: [ main, develop ]
jobs:
test:
name: Test on Node.js ${{ matrix.node-version }}
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20]
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Setup pnpm
uses: pnpm/action-setup@v4
- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- name: Setup pnpm cache
uses: actions/cache@v4
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Build project
run: pnpm build
- name: Run CLI tests with coverage
run: pnpm --filter polyv-live-cli test:coverage
- name: Run SDK tests with coverage
run: pnpm --filter polyv-live-api-sdk test:coverage
- name: Upload coverage reports to Codecov
if: matrix.node-version == 20
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
slug: terryso/polyv-live-cli
directory: ./
files: packages/cli/coverage/lcov.info,packages/sdk/coverage/lcov.info
flags: unittests
fail_ci_if_error: true
- name: Upload test results to Codecov
if: matrix.node-version == 20 && !cancelled()
uses: codecov/test-results-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: packages/cli/test-results/junit.xml,packages/sdk/test-results/junit.xml
build-check:
name: Build Check
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
- name: Setup pnpm
uses: pnpm/action-setup@v4
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Build project
run: pnpm build
- name: Check build output
run: |
echo "Checking build output..."
ls -la packages/cli/dist/
test -f packages/cli/dist/index.js || (echo "❌ dist/index.js not found" && exit 1)
echo "✅ Build output looks good"
- name: Test CLI executable
run: |
echo "Testing CLI executable..."
node packages/cli/dist/index.js --version || echo "Note: CLI may require authentication for full functionality"
echo "✅ CLI executable test completed"