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
80 changes: 80 additions & 0 deletions .github/workflows/landing-integration-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
name: Landing Integration Tests

# Disabled for now - uncomment when you need real database tests
# on:
# push:
# branches: [main, develop]
# paths:
# - "landing/**"
# pull_request:
# branches: [main, develop]
# paths:
# - "landing/**"

jobs:
test:
runs-on: ubuntu-latest

services:
postgres:
image: postgres:15
env:
POSTGRES_PASSWORD: postgres
POSTGRES_DB: test_db
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "18"
cache: "npm"
cache-dependency-path: landing/package-lock.json

- name: Install dependencies
run: |
cd landing
npm ci

- name: Setup environment variables
run: |
cd landing
echo "DATABASE_URL=postgresql://postgres:postgres@localhost:5432/test_db" > .env.test

- name: Run database migrations
run: |
cd landing
npm run db:push
env:
DATABASE_URL: postgresql://postgres:postgres@localhost:5432/test_db

- name: Run integration tests
run: |
cd landing
npm test
env:
DATABASE_URL: postgresql://postgres:postgres@localhost:5432/test_db

- name: Run tests with coverage
run: |
cd landing
npm run test:coverage
env:
DATABASE_URL: postgresql://postgres:postgres@localhost:5432/test_db

- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
with:
file: landing/coverage/lcov.info
flags: landing-integration
name: codecov-landing-integration
fail_ci_if_error: false
52 changes: 52 additions & 0 deletions .github/workflows/landing-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Landing Tests

on:
push:
branches: [main, develop]
paths:
- "landing/**"
pull_request:
branches: [main, develop]
paths:
- "landing/**"

jobs:
test:
runs-on: ubuntu-latest

env:
DATABASE_URL: "postgresql://test:test@localhost:5432/test_db"

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Bun
uses: oven-sh/setup-bun@v1
with:
bun-version: latest

- name: Install dependencies
run: |
cd landing
bun install

- name: Run unit tests
if: false # temporarily disabled
run: |
cd landing
bun test

- name: Run tests with coverage
if: false # temporarily disabled
run: |
cd landing
bun run test:coverage

- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
with:
file: landing/coverage/lcov.info
flags: landing-tests
name: codecov-landing
fail_ci_if_error: false
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
.DS_Store
.DS_Store
.vercel
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<a href="https://tryop.us/" target='_blank' rel='noreferrer'>
<a href="https://tryop.us/" target="_blank" rel="noreferrer">
<img width="500" height="286.92" alt="banner" src="https://github.com/jeffrey-zang/opus/blob/master/assets/banner.svg" />
</a>

Expand Down
59 changes: 38 additions & 21 deletions landing/.gitignore
Original file line number Diff line number Diff line change
@@ -1,24 +1,41 @@
# Logs
logs
*.log
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/.pnp
.pnp.*
.yarn/*
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/versions

# testing
/coverage

# next.js
/.next/
/out/

# production
/build

# misc
.DS_Store
*.pem

# debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

node_modules
dist
dist-ssr
*.local

# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
.pnpm-debug.log*

# env files (can opt-in for committing if needed)
.env*

# vercel
.vercel

# typescript
*.tsbuildinfo
next-env.d.ts
Loading