diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 244cf12..290b9ff 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -1,8 +1,11 @@ # .github/workflows/ci.yaml -# Lints and tests sibyl every time a commit is pushed to the remote repository. +# Lints and tests sibyl on pushes to main and on all pull requests. name: CI -on: [push, pull_request] +on: + push: + branches: [main] + pull_request: jobs: ci: name: CI @@ -21,5 +24,10 @@ jobs: run: pnpm install - name: Lint run: pnpm lint - - name: Test - run: pnpm test + - name: Test with Coverage + run: pnpm test:coverage + - name: Upload coverage results to Codecov + uses: codecov/codecov-action@04b047e8bb82a0c002c8312c1c880fbc6a999d45 + with: + token: ${{ secrets.CODECOV_TOKEN }} + slug: postapsis/sibyl diff --git a/README.md b/README.md index df449ca..1986f6e 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,8 @@ [![POST/APSIS Sibly Page](https://img.shields.io/badge/made_by-POST%2FAPSIS-%23000000)](https://postapsis.com/sibyl) [![sibyl License Page](https://img.shields.io/badge/license-Apache_2.0-brightgreen)](https://raw.githubusercontent.com/postapsis/sibyl/refs/heads/main/LICENSE) +[![sibyl CI Status](https://github.com/postapsis/sibyl/actions/workflows/ci.yaml/badge.svg)](https://github.com/postapsis/sibyl/actions/workflows/ci.yaml) +[![codecov](https://codecov.io/gh/postapsis/sibyl/branch/main/graph/badge.svg)](https://codecov.io/gh/postapsis/sibyl)
--- diff --git a/vitest.config.ts b/vitest.config.ts index 78a2eac..2ea817a 100644 --- a/vitest.config.ts +++ b/vitest.config.ts @@ -12,7 +12,7 @@ export default defineConfig({ provider: "v8", include: ["src/**/*.ts"], exclude: ["src/@types/**/*.ts", "src/exit.ts"], - reporter: ["text", "html"], + reporter: ["text", "html", "lcov"], }, }, });