Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
19 changes: 10 additions & 9 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ concurrency: ${{ github.workflow }}-${{ github.ref }}

env:
WORKSPACES: create-db create-pg create-postgres
PACKAGES_DIR: packages
POSTHOG_API_HOST: ${{ secrets.POSTHOG_API_HOST }}
POSTHOG_API_KEY: ${{ secrets.POSTHOG_API_KEY }}
CREATE_DB_WORKER_URL: ${{ secrets.CREATE_DB_WORKER_URL }}
Expand Down Expand Up @@ -47,7 +48,7 @@ jobs:
- name: 📦 Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 8
version: 10

- name: 🔧 Setup Node.js
uses: actions/setup-node@v4
Expand Down Expand Up @@ -75,12 +76,12 @@ jobs:

for pkg in ${{ env.WORKSPACES }}; do
echo "Publishing $pkg to npm..."
cd "$pkg"
cd "${{ env.PACKAGES_DIR }}/$pkg"
export POSTHOG_API_HOST="${POSTHOG_API_HOST}"
export POSTHOG_API_KEY="${POSTHOG_API_KEY}"
export CREATE_DB_WORKER_URL="${CREATE_DB_WORKER_URL}"
export CLAIM_DB_WORKER_URL="${CLAIM_DB_WORKER_URL}"

# First try to publish
if ! pnpm publish --access public --no-git-checks; then
echo "Publish failed, trying to bump version and retry..."
Expand Down Expand Up @@ -128,7 +129,7 @@ jobs:
- name: 📦 Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 8
version: 10

- name: 🔧 Setup Node.js
uses: actions/setup-node@v4
Expand All @@ -146,7 +147,7 @@ jobs:
- name: 📄 Copy README to child CLIs
run: |
for pkg in create-pg create-postgres; do
cp create-db/README.md "$pkg/README.md"
cp packages/create-db/README.md "packages/$pkg/README.md"
done

- name: 🔖 Create unique preview tag
Expand Down Expand Up @@ -175,7 +176,7 @@ jobs:
echo "Using POSTHOG_API_HOST=${POSTHOG_API_HOST}"

for pkg in ${{ env.WORKSPACES }}; do
cd "$pkg"
cd "${{ env.PACKAGES_DIR }}/$pkg"
export CREATE_DB_WORKER_URL
export CLAIM_DB_WORKER_URL
export POSTHOG_API_HOST="${POSTHOG_API_HOST}"
Expand Down Expand Up @@ -216,9 +217,9 @@ jobs:
npx create-postgres@pr${{ github.event.number }}
\`\`\`

**Worker URLs**
• Create-DB Worker: ${dbUrl}
• Claim-DB Worker: ${clUrl}
**Worker URLs**
• Create-DB Worker: ${dbUrl}
• Claim-DB Worker: ${clUrl}

> These will live as long as this PR exists under tag \`${tag}\`.`
});
15 changes: 3 additions & 12 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 9
version: 10

- name: Setup Node.js
uses: actions/setup-node@v4
Expand All @@ -29,25 +29,16 @@ jobs:

- name: Install Dependencies
run: pnpm install --frozen-lockfile
working-directory: ./claim-db-worker

- name: Run claim-db-worker tests
run: pnpm test
working-directory: ./claim-db-worker
working-directory: ./apps/claim-db-worker
env:
NODE_ENV: test

- name: Install create-db dependencies
run: pnpm install --frozen-lockfile
working-directory: ./create-db

- name: Build create-db
run: pnpm build
working-directory: ./create-db

- name: Run create-db tests
run: pnpm test
working-directory: ./create-db
working-directory: ./packages/create-db
Comment thread
aidankmcalister marked this conversation as resolved.
Outdated
env:
NODE_ENV: test
CREATE_DB_WORKER_URL: ${{ secrets.CREATE_DB_WORKER_URL }}
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Turborepo
.turbo

# Node.js
node_modules/
dist/
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"deploy": "wrangler deploy",
"dev": "wrangler dev",
"start": "wrangler dev",
"test": "vitest",
"test": "vitest --passWithNoTests",
Comment thread
aidankmcalister marked this conversation as resolved.
Outdated
"cf-typegen": "wrangler types"
},
"devDependencies": {
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ export default defineWorkersConfig({
poolOptions: {
workers: {
wrangler: { configPath: './wrangler.jsonc' },
isolatedStorage: false,
},
},
},
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
24 changes: 0 additions & 24 deletions create-db-worker/test/index.spec.ts

This file was deleted.

9 changes: 9 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,15 @@
"name": "create-db-monorepo",
"version": "0.0.10",
"private": true,
"packageManager": "pnpm@10.0.0",
Comment thread
aidankmcalister marked this conversation as resolved.
Outdated
"scripts": {
"build": "turbo run build",
"dev": "turbo run dev --filter=create-db-worker --filter=claim-db-worker --ui=tui",
Comment thread
aidankmcalister marked this conversation as resolved.
Outdated
"dev:create": "turbo run dev --filter=create-db-worker --ui=tui",
"dev:claim": "turbo run dev --filter=claim-db-worker --ui=tui",
"lint": "turbo run lint",
"test": "turbo run test",
"typecheck": "turbo run typecheck",
"changeset": "changeset",
"version": "changeset version",
"publish:cli": "changeset publish --filter create-db",
Expand All @@ -14,6 +22,7 @@
"@commitlint/config-conventional": "^19.8.1",
"husky": "^9.1.7",
"prettier": "^3.0.0",
"turbo": "^2.8.16",
"typescript": "^5.0.0"
}
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading
Loading