Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 21 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ jobs:
run: make -j3 static-check

test:
name: Test
name: Unit Tests
runs-on: ${{ github.repository_owner == 'coder' && 'depot-ubuntu-22.04-16' || 'ubuntu-latest' }}
steps:
- name: Checkout code
Expand All @@ -66,8 +66,16 @@ jobs:

- uses: ./.github/actions/setup-cmux

- name: Run tests
run: make test-unit
- name: Run tests with coverage
run: bun test --coverage --coverage-reporter=lcov src

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./coverage/lcov.info
flags: unit-tests
fail_ci_if_error: false

integration-test:
name: Integration Tests
Expand All @@ -80,12 +88,20 @@ jobs:

- uses: ./.github/actions/setup-cmux

- name: Run integration tests
run: make test-integration
- name: Run integration tests with coverage
run: TEST_INTEGRATION=1 bun x jest --coverage tests
env:
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./coverage/lcov.info
flags: integration-tests
fail_ci_if_error: false

storybook-test:
name: Storybook Interaction Tests
runs-on: ${{ github.repository_owner == 'coder' && 'depot-ubuntu-22.04-16' || 'ubuntu-latest' }}
Expand Down
45 changes: 45 additions & 0 deletions codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# Codecov Configuration
# https://docs.codecov.com/docs/codecovyml-reference

# Disable PR comments - just show status checks
comment: false

coverage:
# Coverage precision (decimal places)
precision: 2
round: down
range: 70..100

status:
# Project coverage status - informational only
project:
default:
target: auto # Compare to base commit
threshold: 5% # Allow 5% drop without changing status
informational: true # Won't block PRs

# Patch coverage status - informational only
patch:
default:
target: auto # Compare to base commit
threshold: 5% # Allow 5% drop without changing status
informational: true # Won't block PRs

# Flag configuration to track unit vs integration test coverage
flags:
unit-tests:
paths:
- src/**
carryforward: false
integration-tests:
paths:
- tests/**
carryforward: false

# Ignore common non-source paths
ignore:
- "**/*.test.ts"
- "**/*.test.tsx"
- "**/dist/**"
- "**/node_modules/**"
- "**/coverage/**"
Loading