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
51 changes: 49 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ on:
push:
branches: [main]

permissions:
contents: read

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
Expand Down Expand Up @@ -71,8 +74,8 @@ jobs:
- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Run unit tests
run: pnpm test:unit
- name: Run unit tests with coverage
run: pnpm test:unit:coverage

test-integration:
name: Integration Tests
Expand Down Expand Up @@ -114,3 +117,47 @@ jobs:

- name: Run integration tests
run: pnpm test:integration

test-e2e:
name: E2E Tests
runs-on: ubuntu-latest
services:
postgres:
image: postgres:16
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: clabot_test
ports:
- 5432:5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
env:
DATABASE_URL: postgres://postgres:postgres@localhost:5432/clabot_test
SESSION_SECRET: ci-e2e-test-secret
steps:
- uses: actions/checkout@v6

- uses: pnpm/action-setup@v4
with:
version: latest

- uses: actions/setup-node@v6
with:
node-version: "20"
cache: "pnpm"

- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Install Playwright browsers
run: pnpm exec playwright install chromium --with-deps

- name: Apply database migrations
run: pnpm db:migrate

- name: Run e2e tests
run: pnpm test:e2e
Comment thread Fixed
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@ node_modules/
*.tsbuildinfo

test-results
coverage/
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# CLA Bot

![Coverage](https://raw.githubusercontent.com/514-labs/cla-bot/badges/coverage.svg)

CLA Bot is a Next.js app that automates Contributor License Agreement (CLA) workflows for GitHub organizations and personal accounts.

It gives org admins a place to manage CLA text and signing history, and gives contributors a place to review/sign/re-sign agreements. A GitHub webhook handler enforces CLA status on pull requests by creating checks/comments.
Expand Down
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"test": "pnpm test:unit && pnpm test:integration",
"test:all": "pnpm test && pnpm test:e2e",
"test:unit": "vitest run",
"test:unit:coverage": "vitest run --coverage",
"test:unit:watch": "vitest",
"test:integration": "vitest run --config vitest.integration.config.ts",
"test:e2e": "playwright test tests/e2e/pages-reference.spec.ts",
Expand Down Expand Up @@ -86,6 +87,7 @@
"@types/node": "^22",
"@types/react": "^19",
"@types/react-dom": "^19",
"@vitest/coverage-v8": "^4.0.18",
"drizzle-kit": "^0.30.0",
"postcss": "^8.5",
"tailwindcss": "^3.4.17",
Expand Down
Loading