Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft PR to test CI/test workflows #134

Open
wants to merge 86 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
86 commits
Select commit Hold shift + click to select a range
c225864
Added .prettierrc
jawj Nov 26, 2024
9b403a3
Updated all packages (except pg, deliberately held back)
jawj Nov 26, 2024
69bf9e6
Added VSCode settings to use Prettier formatting (in line with npm ru…
jawj Nov 26, 2024
61fc3d2
Added vitest and test and types GitHub Actions
jawj Nov 26, 2024
f2717e8
Fixed prettier issue
jawj Nov 26, 2024
92574f3
Rename GitHub actions
jawj Nov 26, 2024
c9a1fed
Updated README to address #108
jawj Dec 6, 2024
c5d6ee7
Refactored workflows
jawj Dec 10, 2024
77c5c0a
Update workflows
jawj Dec 10, 2024
24497ff
Fix workflows
jawj Dec 10, 2024
344fdf0
Fixed format
jawj Dec 10, 2024
dd0e700
Added transaction() tests
jawj Dec 12, 2024
201a860
Added http tests
jawj Dec 12, 2024
08b8abb
Non-tagged template http queries added to tests
jawj Dec 12, 2024
e9f1420
More tests, and reporting connection errors toString() instead of mes…
jawj Dec 12, 2024
0646eaf
More tests
jawj Dec 13, 2024
cbf65f9
Refactored sample select queries into one place
jawj Dec 13, 2024
9aff80f
Changed remaining calls to toMatchObject to toStrictEqual in tests
jawj Dec 13, 2024
3a4889c
Additional tests, and began types auto-generation using api-extractor
jawj Dec 16, 2024
2520b1c
Type generation fixes
jawj Dec 16, 2024
fa4aa88
Undid change to prettier lineWidth
jawj Dec 17, 2024
8c4a414
Fixed subtls usage -- and got custom wsProxy/subtls test working
jawj Dec 17, 2024
ca374e5
Moved types generation to export.sh script
jawj Dec 17, 2024
b71ff7a
Work on auto-generated types
jawj Dec 18, 2024
3b6d2d5
Tweaked types generation
jawj Dec 18, 2024
d29753b
Added env var/secret for test workflow
jawj Dec 18, 2024
fbac7eb
Merge branch 'main' into jawj/adding-tests
jawj Dec 18, 2024
11d5525
Merged main
jawj Dec 18, 2024
afbca19
Relaxed WebSocket types to accept anything reasonable
jawj Dec 18, 2024
bcf0060
Added WebSocket shim for http tests
jawj Dec 18, 2024
6af67df
Refactired out WebSocket shimming
jawj Dec 18, 2024
f8ba0b0
Run CI tests in node (incl edge-runtime), not bun
jawj Dec 18, 2024
357ade9
Fixed Node LTS version specification in test.yml
jawj Dec 18, 2024
85f390b
format:fix
jawj Dec 18, 2024
eb9ad9f
fixing check script
jawj Dec 18, 2024
04774b8
Test on Node 18, not Node 20
jawj Dec 19, 2024
e22873f
Fixed driver and tests to work in Node 18
jawj Dec 19, 2024
0da9b27
format:fix
jawj Dec 19, 2024
288e45d
Test that poolQueryViaFetch is inhibited by connect listener, and dri…
jawj Dec 19, 2024
06cd173
Deleted unused files
jawj Dec 19, 2024
c022d38
Do ws tests with both direct and -pooler URLs
jawj Dec 21, 2024
9693fef
Added -pooler URL env var to test.yml
jawj Dec 21, 2024
1691fcb
Headless browser tests working locally
jawj Jan 6, 2025
099ab64
Try headless browser tests in CI
jawj Jan 6, 2025
2a857ba
Installing playwright deps for CI browser tests
jawj Jan 6, 2025
40e4bec
Install only chromium for Playwright
jawj Jan 6, 2025
038f28c
Type tests and type fixes
jawj Jan 7, 2025
b99b9eb
Added JSDoc comments to generated types
jawj Jan 7, 2025
9dba581
Rationalised types further
jawj Jan 7, 2025
2474a45
Added simple Cloudflare Worker test
jawj Jan 8, 2025
5cc4f2e
Formatting fixes in CF Worker test
jawj Jan 8, 2025
29a9c7d
Add Cloudflare Worker tests to CI
jawj Jan 8, 2025
d95dd28
Experimentally moved env section of test.yml to remove redundancy
jawj Jan 8, 2025
32f3587
Format fixed
jawj Jan 8, 2025
d295ae5
Tidying tests
jawj Jan 9, 2025
4a091be
Make compatible with Node 16 by polyfilling fetch as necessary
jawj Jan 9, 2025
e17e0f2
Switched Node 18 CI tests to Node 16
jawj Jan 9, 2025
dc8b966
Added Vercel Edge and Node runtime tests
jawj Jan 9, 2025
e6bf5b6
Added Vercel tests to CI
jawj Jan 9, 2025
d3f7502
Fix Cloudflare test following rename
jawj Jan 9, 2025
c37d317
Added Drizzle tests
jawj Jan 10, 2025
1d9d2c0
Added basic Prisma tests
jawj Jan 10, 2025
9c9189f
Try to fix npm install for Prisma with --ignore-scripts, and allow QU…
jawj Jan 10, 2025
f12cdde
Better way to fix prisma issue on Node 16 CI tests
jawj Jan 10, 2025
7e3b02d
Add sudo to apt install in CI
jawj Jan 10, 2025
bd5cacd
Switched apt for apt-get in CI, and format:fix
jawj Jan 10, 2025
ebf2440
Updated tests README
jawj Jan 10, 2025
ce30663
Testing README update
jawj Jan 13, 2025
fa94b86
Updated CI scripts, removing Bun
jawj Jan 15, 2025
018c2a2
Create a test:all script to run all tests without re-exporting before…
jawj Jan 15, 2025
34d4a5e
Rename test:all to test
jawj Jan 15, 2025
bd7db48
Temporarily run tests 100x in CI to check flakiness
jawj Jan 15, 2025
85706c9
Revert the 100x testing change
jawj Jan 15, 2025
bd2f3af
Restored export npm script
jawj Jan 17, 2025
b507243
Tweaks related to PR review, plus temporary type fixes
jawj Jan 17, 2025
6bf2dc5
Moved a dependency to a devDependency (Prisma adapter)
jawj Jan 17, 2025
5713121
format:fix
jawj Jan 17, 2025
73e2bf0
Started on Authorize tests
jawj Jan 17, 2025
90b97ee
Continuing Authorize tests
jawj Jan 17, 2025
933b25f
Authorize test working
jawj Jan 17, 2025
2ca305e
Updated vars and secrets in test.yml
jawj Jan 17, 2025
cae52c8
Formatting
jawj Jan 17, 2025
2c1f7f2
Added node-fetch for authorize in Node 16
jawj Jan 17, 2025
ab13e6b
Fetch fix
jawj Jan 17, 2025
ecf8a69
Fetch fix again
jawj Jan 17, 2025
fd267f1
Updated comment on _bundleExt export
jawj Jan 18, 2025
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
7 changes: 7 additions & 0 deletions .env.template
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# copy to .env.test and fill in the blanks
VITE_NEON_DB_URL="postgresql:// ..."
VITE_NEON_DB_POOLER_URL="postgresql:// ..."
VITE_WSPROXY="... .workers.dev"
VITE_VERCEL_TOKEN="..."
VITE_CLERK_USER="... @neon.tech"
VITE_CLERK_SECRET_KEY="sk_test_ ..."
8 changes: 4 additions & 4 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ jobs:
steps:
# setup
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v2
- uses: actions/setup-node@v4

- name: Install package dependencies
run: bun install
run: npm install

# goal
- name: Check TypeScript types
run: bun run check
run: npm run check

- name: Check code formatting
run: bun run format
run: npm run format
41 changes: 36 additions & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,48 @@ on:
branches:
- main

env:
VITE_NEON_DB_URL: ${{ secrets.VITE_NEON_DB_URL }}
VITE_NEON_DB_POOLER_URL: ${{ secrets.VITE_NEON_DB_POOLER_URL }}
VITE_VERCEL_TOKEN: ${{ secrets.VITE_VERCEL_TOKEN }}
VITE_CLERK_SECRET_KEY: ${{ secrets.VITE_CLERK_SECRET_KEY }}
VITE_WSPROXY: ${{ vars.VITE_WSPROXY }}
VITE_CLERK_USER: ${{ vars.VITE_CLERK_USER }}

jobs:
test:
test-node-16:
runs-on: ubuntu-latest
steps:
# setup
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 16

- name: Install package dependencies
run: |
# strip Prisma, whose preinstall script throws on Node versions less than 18.x
sudo apt-get install jq && \
mv package.json package.json.old && \
jq 'del(.devDependencies.prisma, .devDependencies."@prisma/client")' package.json.old > package.json
npm install

# goal
- name: Run CLI-based tests in Node 16 (no native WebSocket or fetch), node environment
run: npm run test:node

test-node-lts:
runs-on: ubuntu-latest
steps:
# setup
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v2
- uses: actions/setup-node@v4
with:
node-version: lts/*

- name: Install package dependencies
run: bun install
run: npm install

# goal
- name: Run tests
run: bun run test
- name: Run all tests in Node LTS
run: npm run test
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
.dev.vars
.env.local
.env.*
pffigueiredo marked this conversation as resolved.
Show resolved Hide resolved
!.env.template
node_modules
tmp
.DS_Store
29 changes: 29 additions & 0 deletions api-extractor.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"mainEntryPointFilePath": "dist/dts/export/index.d.ts",
"newlineKind": "lf",
"enumMemberOrder": "preserve",
"bundledPackages": ["subtls"],
"dtsRollup": {
"enabled": true,
"untrimmedFilePath": "dist/dts/_extracted.d.ts"
},
"apiReport": {
"enabled": false
},
"docModel": {
"enabled": false
},
"tsdocMetadata": {
"enabled": false
},
"messages": {
"extractorMessageReporting": {
"ae-wrong-input-file-type": {
"logLevel": "none"
},
"ae-missing-release-tag": {
"logLevel": "none"
}
}
}
}
Loading
Loading