Skip to content

Commit

Permalink
Added CI workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
MrRibcage committed Jun 5, 2024
1 parent 2338463 commit 9c609bf
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @CarletonComputerScienceSociety/core
15 changes: 15 additions & 0 deletions .github/ci-config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import type { Config } from "drizzle-kit";
import dotenv from "dotenv";

dotenv.config();

export default {
schema: "./db/schema.ts",
out: "./db/migrations",
dialect: "sqlite",
driver: "better-sqlite",
dbCredentials: {
url: process.env.DATABASE_URL,
},
verbose: true,
} as Config;
22 changes: 22 additions & 0 deletions .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: CI
'on':
- push
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install modules
run: |
npm install
npm install dotenv-cli
- name: Run Prettier
run: |
npm run check
- name: Setup db
run: |
echo -e 'PORT=3000\nDATABASE_URL="./db/test.db"' > .env.test
npx dotenv -e .env.test -- drizzle-kit push --config=.github/ci-config.ts
- name: Run tests
run: |
npm run test

0 comments on commit 9c609bf

Please sign in to comment.