Skip to content

Commit

Permalink
Merge branch 'master' into 780-add-order-by-support-to-aggregate
Browse files Browse the repository at this point in the history
  • Loading branch information
igalklebanov authored Sep 15, 2024
2 parents d476c00 + 88d0b8a commit b1d987e
Show file tree
Hide file tree
Showing 170 changed files with 16,018 additions and 12,973 deletions.
144 changes: 123 additions & 21 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,18 @@ name: tests

on:
push:
branches: [master]
branches: [master, v*]
pull_request:
branches: [master]
branches: [master, v*]

jobs:
run-tests:
node:
name: Node.js
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [18.x, 20.x, 22.x]
bun-version: [1.0.23]
deno-version: [1.42.x]

steps:
- uses: actions/checkout@v4
Expand All @@ -25,43 +24,146 @@ jobs:
node-version: ${{ matrix.node-version }}
cache: 'npm'

- name: Install dependencies
run: npm ci

- name: Run docker compose
run: docker compose up -d

- name: Run node tests
run: npm test

- name: Run esbuild test
run: npm run test:esbuild

node-with-transformer:
name: Node.js /w transformer
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [18.x, 20.x, 22.x]

steps:
- uses: actions/checkout@v4

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'

- name: Install dependencies
run: npm ci

- name: Run docker compose
run: docker compose up -d

- name: Run node tests with transformer
run: TEST_TRANSFORMER=1 npm test

deno:
name: Deno
runs-on: ubuntu-latest

strategy:
matrix:
deno-version: [1.46.x]

steps:
- uses: actions/checkout@v4

- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: 22.x
cache: 'npm'

- name: Install dependencies
run: npm ci

- name: Use Deno ${{ matrix.deno-version }}
uses: denoland/setup-deno@v1
with:
deno-version: ${{ matrix.deno-version }}

- name: Use Bun ${{ matrix.bun-version }}
uses: oven-sh/setup-bun@v1
- name: Run docker compose
run: docker compose up -d

- name: Run deno tests
run: npm run test:deno

bun:
name: Bun
runs-on: ubuntu-latest

strategy:
matrix:
bun-version: [1.1.26]

steps:
- uses: actions/checkout@v4

- name: Use Node.js
uses: actions/setup-node@v4
with:
bun-version: ${{ matrix.bun-version }}
node-version: 22.x
cache: 'npm'

- name: Install dependencies
run: npm ci

- name: Install playwright
run: npx playwright install
- name: Use Bun ${{ matrix.bun-version }}
uses: oven-sh/setup-bun@v2
with:
bun-version: ${{ matrix.bun-version }}

- name: Run docker compose
run: docker compose up -d

- name: Run node tests
run: npm test
- name: Run bun tests
run: npm run test:bun

- name: Run node tests with transformer
run: TEST_TRANSFORMER=1 npm test
browser:
name: Browser
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: 22.x
cache: 'npm'

- name: Install dependencies
run: npm ci

- name: Install playwright
run: npx playwright install chromium

- name: Run browser tests
run: npm run test:browser

- name: Run deno tests
run: npm run test:deno
cloudflare-workers:
name: Cloudflare Workers
runs-on: ubuntu-latest

- name: Run bun tests
run: npm run test:bun
steps:
- uses: actions/checkout@v4

- name: Run esbuild test
run: npm run test:esbuild
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: 22.x
cache: 'npm'

- name: Install dependencies
run: npm ci

- name: Run docker compose
run: docker compose up -d

- name: Run cloudflare workers test
if: matrix.node-version != '18.x'
run: npm run test:cloudflare-workers
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ for all cases, are best left for consumers to implement.

5. create a branch.

6. create a draft pull request. link the relevant issue by refering to it in the
6. create a draft pull request. link the relevant issue by referring to it in the
PR's description. E.g. `closes #123` will link the PR to issue/pull request #123.

7. implement your changes.
Expand Down
2 changes: 1 addition & 1 deletion example/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ npm install
npm test
```

You need to have postgres running in the default port `5432` and the default postgres user `postgres` should exist with no password. You can modify the [test configuration](https://github.com/koskimas/kysely/blob/master/example/test/test-config.ts) if you want to use different settings.
You need to have postgres running in the default port `5432` and the default postgres user `postgres` should exist with no password. You can modify the [test configuration](https://github.com/kysely-org/kysely/blob/master/example/test/test-config.ts) if you want to use different settings.
4 changes: 2 additions & 2 deletions example/src/util/errors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export type AuthenticationErrors =

export type UserApiErrors = 'InvalidUser' | 'UserNotFound'

export type SignInMethodApiErros =
export type SignInMethodApiErrors =
| 'InvalidSignInMethod'
| 'UserAlreadyHasSignInMethod'
| 'PasswordTooWeak'
Expand All @@ -21,7 +21,7 @@ export type ErrorCode =
| 'UnknownError'
| AuthenticationErrors
| UserApiErrors
| SignInMethodApiErros
| SignInMethodApiErrors

export type ErrorStatus = 400 | 401 | 403 | 404 | 409 | 500

Expand Down
2 changes: 1 addition & 1 deletion example/test/test-context.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export class TestContext {
await sql`create database ${sql.id(database!)}`.execute(adminDb)
await adminDb.destroy()

// Now connect to the test databse and run the migrations
// Now connect to the test database and run the migrations
const db = new Kysely<any>({
dialect: new PostgresDialect({
pool: new Pool(testConfig.database),
Expand Down
Loading

0 comments on commit b1d987e

Please sign in to comment.