Skip to content

Commit 6feaf74

Browse files
authored
Merge pull request #1 from RooVetGit/cte/modernize
2 parents 5217c2d + b4cd909 commit 6feaf74

File tree

198 files changed

+20190
-46854
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

198 files changed

+20190
-46854
lines changed
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#!/bin/bash
2+
3+
set -e
4+
set -u
5+
6+
if [ -n "$POSTGRES_DATABASES" ]; then
7+
for db in $(echo $POSTGRES_DATABASES | tr ',' ' '); do
8+
echo "Creating $db..."
9+
psql -v ON_ERROR_STOP=1 -c "CREATE DATABASE $db;"
10+
done
11+
fi

.env

Lines changed: 10 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,17 @@
1-
# FIXME: Configure environment variables for your project
2-
3-
# Clerk authentication
4-
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=pk_test_b3Blbi1zdGlua2J1Zy04LmNsZXJrLmFjY291bnRzLmRldiQ
1+
BILLING_PLAN_ENV=dev
52

3+
# Clerk
4+
# https://clerk.com/docs/deployments/clerk-environment-variables#sign-in-and-sign-up-redirects
65
NEXT_PUBLIC_CLERK_SIGN_IN_URL=/sign-in
6+
NEXT_PUBLIC_CLERK_SIGN_UP_URL=/sign-up
7+
NEXT_PUBLIC_CLERK_SIGN_IN_FORCE_REDIRECT_URL=/dashboard
8+
NEXT_PUBLIC_CLERK_SIGN_UP_FORCE_REDIRECT_URL=/dashboard
9+
NEXT_PUBLIC_CLERK_SIGN_IN_FALLBACK_REDIRECT_URL=/dashboard
10+
NEXT_PUBLIC_CLERK_SIGN_UP_FALLBACK_REDIRECT_URL=/dashboard
11+
NEXT_PUBLIC_CLERK_FRONTEND_API=https://epic-chamois-85.clerk.accounts.dev
12+
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=pk_test_ZXBpYy1jaGFtb2lzLTg1LmNsZXJrLmFjY291bnRzLmRldiQ
713

814
# Stripe
9-
# If you need a real Stripe subscription payment with checkout page, customer portal, webhook, etc.
10-
# You can check out the Next.js Boilerplate Pro at: https://nextjs-boilerplate.com/pro-saas-starter-kit
1115
NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=pk_test_51PNk4fKOp3DEwzQle6Cx1j3IW1Lze5nFKZ4JBX0gLpNQ3hjFbMiT25gw7LEr369ge7JIsVA2qRhdKQm1NAmVehXl00FQxwRfh1
12-
# Use Stripe test mode price id or production price id
13-
BILLING_PLAN_ENV=dev
14-
15-
######## [BEGIN] SENSITIVE DATA ######## For security reason, don't update the following variables (secret key) directly in this file.
16-
######## Please create a new file named `.env.local`, all environment files ending with `.local` won't be tracked by Git.
17-
######## After creating the file, you can add the following variables.
18-
# Clerk authentication
19-
CLERK_SECRET_KEY=your_clerk_secret_key
20-
21-
# Stripe
2216
STRIPE_SECRET_KEY=your_stripe_secret_key
2317
STRIPE_WEBHOOK_SECRET=your_stripe_webhook_secret
24-
######## [END] SENSITIVE DATA

.env.development

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
DATABASE_URL=postgres://postgres:password@localhost:5432/roo_code_development

.env.local.sample

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
CLERK_SECRET_KEY=your_clerk_secret_key

.env.test

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
DATABASE_URL=postgres://postgres:password@localhost:5432/roo_code_test

.github/FUNDING.yml

Lines changed: 0 additions & 4 deletions
This file was deleted.

.github/workflows/CI.yml

Lines changed: 52 additions & 93 deletions
Original file line numberDiff line numberDiff line change
@@ -6,110 +6,69 @@ on:
66
pull_request:
77
branches: [main]
88

9-
jobs:
10-
build:
11-
strategy:
12-
matrix:
13-
node-version: [20.x, 22.6] # Need to use 22.6 due to Next.js build errors: https://github.com/vercel/next.js/issues/69263
14-
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
15-
16-
name: Build with ${{ matrix.node-version }}
17-
runs-on: ubuntu-latest
18-
19-
steps:
20-
- uses: actions/checkout@v3
21-
- name: Use Node.js ${{ matrix.node-version }}
22-
uses: actions/setup-node@v3
23-
with:
24-
node-version: ${{ matrix.node-version }}
25-
cache: npm
26-
- run: npm ci
27-
- run: npm run build
9+
env:
10+
NODE_VERSION: 20.18.1
11+
PNPM_VERSION: 10.8.1
2812

13+
jobs:
2914
test:
30-
strategy:
31-
matrix:
32-
node-version: [20.x]
33-
3415
name: Run all tests
3516
runs-on: ubuntu-latest
3617

3718
steps:
38-
- uses: actions/checkout@v3
39-
with:
40-
fetch-depth: 0 # Retrieve Git history, needed to verify commits
41-
- name: Use Node.js ${{ matrix.node-version }}
42-
uses: actions/setup-node@v3
19+
- name: Checkout code
20+
uses: actions/checkout@v4
4321
with:
44-
node-version: ${{ matrix.node-version }}
45-
cache: npm
46-
- run: npm ci
47-
48-
- name: Build Next.js for E2E tests
49-
run: npm run build
50-
env:
51-
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
52-
53-
- if: github.event_name == 'pull_request'
54-
name: Validate all commits from PR
55-
run: npx commitlint --from ${{ github.event.pull_request.base.sha }} --to ${{ github.event.pull_request.head.sha }} --verbose
56-
57-
- name: Linter
58-
run: npm run lint
59-
60-
- name: Type checking
61-
run: npm run check-types
62-
63-
- name: Run unit tests
64-
run: npm run test -- --coverage
65-
66-
- name: Upload coverage reports to Codecov
67-
uses: codecov/codecov-action@v4
68-
env:
69-
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
70-
71-
- name: Install Playwright (used for Storybook and E2E tests)
72-
run: npx playwright install --with-deps
73-
74-
- name: Run storybook tests
75-
run: npm run test-storybook:ci
22+
fetch-depth: 0
7623

77-
- name: Run E2E tests
78-
run: npx percy exec -- npm run test:e2e
79-
env:
80-
PERCY_TOKEN: ${{ secrets.PERCY_TOKEN }}
81-
CLERK_SECRET_KEY: ${{ secrets.CLERK_SECRET_KEY }}
24+
- name: Install pnpm
25+
uses: pnpm/action-setup@v4
26+
with:
27+
version: ${{ env.PNPM_VERSION }}
8228

83-
- uses: actions/upload-artifact@v4
84-
if: always()
29+
- name: Setup Node.js
30+
uses: actions/setup-node@v4
8531
with:
86-
name: test-results
87-
path: test-results/
88-
retention-days: 7
32+
node-version: ${{ env.NODE_VERSION }}
33+
cache: pnpm
8934

90-
synchronize-with-crowdin:
91-
name: GitHub PR synchronize with Crowdin
92-
runs-on: ubuntu-latest
35+
- name: Install dependencies
36+
run: pnpm install
9337

94-
needs: [build, test]
95-
if: github.event_name == 'pull_request'
38+
# - name: Build Next.js for E2E tests
39+
# run: pnpm build
40+
# env:
41+
# SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
9642

97-
steps:
98-
- uses: actions/checkout@v4
99-
with:
100-
ref: ${{ github.event.pull_request.head.sha }} # Crowdin Actions needs to push commits to the PR branch, checkout HEAD commit instead of merge commit
101-
fetch-depth: 0
43+
- name: Run linter
44+
run: pnpm lint
10245

103-
- name: crowdin action
104-
uses: crowdin/github-action@v2
105-
with:
106-
upload_sources: true
107-
upload_translations: true
108-
download_translations: true
109-
create_pull_request: false
110-
localization_branch_name: ${{ github.head_ref || github.ref_name }} # explanation here: https://stackoverflow.com/a/71158878
111-
commit_message: 'chore: new Crowdin translations by GitHub Action'
112-
env:
113-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
114-
CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }}
115-
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}
46+
- name: Run type checker
47+
run: pnpm check-types
48+
49+
- name: Run unit tests
50+
run: pnpm test # -- --coverage
51+
52+
# - name: Upload coverage reports to Codecov
53+
# uses: codecov/codecov-action@v4
54+
# env:
55+
# CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
56+
57+
# - name: Install Playwright (used for Storybook and E2E tests)
58+
# run: npx playwright install --with-deps
59+
60+
# - name: Run storybook tests
61+
# run: pnpm test-storybook:ci
62+
63+
# - name: Run E2E tests
64+
# run: npx percy exec -- npm run test:e2e
65+
# env:
66+
# PERCY_TOKEN: ${{ secrets.PERCY_TOKEN }}
67+
# CLERK_SECRET_KEY: ${{ secrets.CLERK_SECRET_KEY }}
68+
69+
# - uses: actions/upload-artifact@v4
70+
# if: always()
71+
# with:
72+
# name: test-results
73+
# path: test-results/
74+
# retention-days: 7

.github/workflows/checkly.yml

Lines changed: 0 additions & 63 deletions
This file was deleted.

.github/workflows/crowdin.yml

Lines changed: 0 additions & 33 deletions
This file was deleted.

.github/workflows/release.yml

Lines changed: 0 additions & 39 deletions
This file was deleted.

0 commit comments

Comments
 (0)