-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: upgrade dependencies and add test suite (#36)
* test: add vitest * test: setup ci to run the tests * feat: update drizzle * refactor: tsc fixes * chore: swap `nodemon + ts-node` for `tsx` * build: ci test script
- Loading branch information
1 parent
fcb9a99
commit 68b96c5
Showing
12 changed files
with
2,735 additions
and
1,858 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
name: pr | ||
|
||
on: | ||
push: | ||
branches: [master] | ||
pull_request: | ||
branches: [master] | ||
|
||
jobs: | ||
test: | ||
name: test | ||
runs-on: ubuntu-latest | ||
steps: | ||
# This step uses the actions/checkout action to download a copy of your repository on the runner. | ||
- name: Checkout repo | ||
uses: actions/checkout@v4 | ||
|
||
# This step uses the pnpm/action-setup action to set up pnpm on the runner. | ||
- name: Install pnpm | ||
uses: pnpm/action-setup@v3 | ||
with: | ||
version: 9 | ||
|
||
# This step uses the actions/setup-node action to set up a Node.js environment on the runner. | ||
- name: Use Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version-file: .nvmrc | ||
cache: pnpm | ||
|
||
# This step runs the install script for the selected node package manager. | ||
- name: Install dependencies | ||
run: pnpm install | ||
|
||
# This step runs the test script if there is one specified under the scripts key in your package.json file. | ||
- name: Test | ||
run: pnpm test:ci | ||
|
||
build: | ||
name: build | ||
needs: [test] | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
node-version: [20] | ||
steps: | ||
# This step uses the actions/checkout action to download a copy of your repository on the runner. | ||
- name: Checkout repo | ||
uses: actions/checkout@v4 | ||
|
||
# This step uses the pnpm/action-setup action to set up pnpm on the runner. | ||
- name: Install pnpm | ||
uses: pnpm/action-setup@v3 | ||
with: | ||
version: 9 | ||
|
||
# This step uses the actions/setup-node action to set up a Node.js environment on the runner. | ||
- name: Use Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version-file: .nvmrc | ||
cache: pnpm | ||
|
||
# This step runs the install script for the selected node package manager. | ||
- name: Install dependencies | ||
run: pnpm install | ||
|
||
# This step runs the build script if there is one specified under the scripts key in your package.json file. | ||
- name: Build | ||
run: pnpm build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
v21.7.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,17 @@ | ||
import "dotenv/config"; | ||
import type { Config } from "drizzle-kit"; | ||
import { defineConfig } from "drizzle-kit"; | ||
|
||
const DB_URL = process.env.DATABASE_URL; | ||
|
||
if (!DB_URL) { | ||
throw new Error("DATABASE_URL is not defined"); | ||
} | ||
|
||
export default { | ||
export default defineConfig({ | ||
schema: "./src/config/db/schema.ts", | ||
out: "./drizzle", | ||
driver: "pg", | ||
dialect: "postgresql", | ||
dbCredentials: { | ||
connectionString: DB_URL, | ||
url: DB_URL, | ||
}, | ||
} satisfies Config; | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.