Skip to content

Commit

Permalink
Merge pull request #61 from sebastianwessel/repo_config
Browse files Browse the repository at this point in the history
Allow Override of Container Image Name #60
  • Loading branch information
sebastianwessel authored Aug 30, 2024
2 parents d0073f1 + 98f69f7 commit 287dc3a
Show file tree
Hide file tree
Showing 8 changed files with 116 additions and 287 deletions.
49 changes: 49 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Continuous Integration

on:
pull_request:
branches:
- main
push:
branches:
- main

permissions:
contents: read

jobs:
test-and-build:
name: TypeScript Tests
runs-on: ubuntu-latest

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

- name: Setup Biome
uses: biomejs/setup-biome@v2
with:
version: latest

- name: Setup Node.js
id: setup-node
uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
cache: npm

- name: Install Dependencies
id: npm-ci
run: npm ci

- name: Run Biome
run: biome ci .

- name: Test
id: npm-ci-test
run: npm test

- name: Build
id: npm-ci-build
run: npm run build
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
20.11
20.17
14 changes: 13 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,8 @@ Options:
-o, --outputFolder output folder (default: client_generated)
-g, --generateClient generate client (default: true)
--no-generateClient no client generation
-i, --surrealImage SurrealDB docker image (default: surrealdb/surrealdb:latest)

-h, --help display help for command
```

Expand All @@ -100,7 +102,9 @@ Example:
"db": "my_database",
"outputFolder": "./out",
"generateClient": true,
"lib": "surrealdb"
"lib": "surrealdb",
"surrealImage": "surrealdb/surrealdb:latest"

}
```

Expand All @@ -119,6 +123,14 @@ or you can specify the path in the config file:
}
```

using a schema file utilises a temporary in-memory SurrealDB instance to generate the zod schemas; this instance runs in a docker container.
If you want to use a different image, you can specify it in the config file:
```json
{
"surrealImage": "surrealdb/surrealdb:latest"
}
```

## Connecting to an Existing SurrealDB Instance

To connect to an existing SurrealDB instance, simply omit the `-f` option, or omit the `schemaFile` in the config file.
Expand Down
Loading

0 comments on commit 287dc3a

Please sign in to comment.