Skip to content

Commit

Permalink
Collect coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
exoego committed May 30, 2024
1 parent 41e9cb2 commit 78e44bb
Showing 1 changed file with 53 additions and 0 deletions.
53 changes: 53 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,30 @@ on:
- 'LICENSE'

jobs:
coverage:
name: 'Coverage'
runs-on: ubuntu-latest
needs:
# Deno excluded because it does not contain Deno-specific coverage
- main
- bun
- fastly
- node
- wrangler
- lambda
- lambda-edge
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
pattern: coverage-*
merge-multiple: true
- uses: codecov/codecov-action@v4
with:
fail_ci_if_error: true
directory: ./coverage
token: ${{ secrets.CODECOV_TOKEN }}

main:
name: 'Main'
runs-on: ubuntu-latest
Expand All @@ -28,6 +52,10 @@ jobs:
- run: bun run lint
- run: bun run build
- run: bun run test
- uses: actions/upload-artifact@v4
with:
name: coverage-main
path: coverage/

jsr-dry-run:
name: "Checking if it's valid for JSR"
Expand Down Expand Up @@ -60,6 +88,10 @@ jobs:
with:
bun-version: '1.0.25'
- run: bun run test:bun
- uses: actions/upload-artifact@v4
with:
name: coverage-bun
path: coverage/

fastly:
name: 'Fastly Compute'
Expand All @@ -70,6 +102,10 @@ jobs:
- run: bun install
- run: bun run build
- run: bun run test:fastly
- uses: actions/upload-artifact@v4
with:
name: fastly-coverage
path: coverage/

node:
name: 'Node.js v${{ matrix.node }}'
Expand All @@ -86,6 +122,11 @@ jobs:
- run: bun install
- run: bun run build
- run: bun run test:node
- uses: actions/upload-artifact@v4
if: matrix.node == '22.x'
with:
name: coverage-node
path: coverage/

wrangler:
name: 'Cloudflare Workers'
Expand All @@ -96,6 +137,10 @@ jobs:
- run: bun install
- run: bun run build
- run: bun run test:wrangler
- uses: actions/upload-artifact@v4
with:
name: coverage-wrangler
path: coverage/

lambda:
name: 'AWS Lambda'
Expand All @@ -106,6 +151,10 @@ jobs:
- run: bun install
- run: bun run build
- run: bun run test:lambda
- uses: actions/upload-artifact@v4
with:
name: coverage-lambda
path: coverage/

lambda-edge:
name: 'Lambda@Edge'
Expand All @@ -116,3 +165,7 @@ jobs:
- run: bun install --frozen-lockfile
- run: bun run build
- run: bun run test:lambda-edge
- uses: actions/upload-artifact@v4
with:
name: coverage-lambda-edge
path: coverage/

0 comments on commit 78e44bb

Please sign in to comment.