fix: use clover.xml for Codecov coverage upload #48
This file contains hidden or 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: CI | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| build-and-test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@v4 | |
| with: | |
| run_install: false | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22 | |
| cache: pnpm | |
| cache-dependency-path: pnpm-lock.yaml | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Build packages | |
| run: pnpm run build | |
| - name: Verify provider artifacts | |
| run: | | |
| test -f packages/provider/openai/dist/src/index.js | |
| test -f packages/provider/openai/dist/src/index.d.ts | |
| test -f packages/provider/anthropic/dist/src/index.js | |
| test -f packages/provider/anthropic/dist/src/index.d.ts | |
| - name: Lint | |
| run: pnpm run lint | |
| - name: Run tests with coverage | |
| run: pnpm run test:coverage | |
| - name: Upload coverage to Codecov | |
| uses: codecov/codecov-action@v4 | |
| with: | |
| file: ./coverage/clover.xml | |
| flags: unittests | |
| name: codecov-umbrella | |
| fail_ci_if_error: false | |
| - name: Type check Next.js example | |
| run: pnpm --filter tetherai-nextjs-example exec tsc -p tsconfig.json --noEmit | |
| - name: Build Next.js example | |
| env: | |
| OPENAI_API_KEY: "sk-dummy" | |
| run: pnpm --filter tetherai-nextjs-example run build |