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

fix ci #221

Merged
merged 13 commits into from
Jun 19, 2024
14 changes: 8 additions & 6 deletions .github/workflows/api-formatting-linting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ on:
- main
workflow_dispatch:

permissions:
contents: write

jobs:
formatting:
runs-on: ubuntu-latest
Expand All @@ -18,20 +21,19 @@ jobs:
steps:
- uses: actions/checkout@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
ref: ${{ github.event.pull_request.head.ref }}
- uses: oven-sh/setup-bun@v1
with:
bun-version: latest # or "latest", "canary", <sha>
- name: Install dependencies
run: bun install
- name: Format
run: bun run format
- name: Commit and push changes
uses: devops-infra/action-commit-push@master
- uses: EndBug/add-and-commit@v9 # You can change this to use a specific version.
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
commit_message: format code
target_branch: ${{ github.event.pull_request.head.ref }}
author_name: Github Action
message: "format(api): formatt code"
push: true
linting:
needs: formatting
runs-on: ubuntu-latest
Expand Down
20 changes: 12 additions & 8 deletions .github/workflows/client-formatting-linting.yml
Original file line number Diff line number Diff line change
@@ -1,42 +1,46 @@
name: Client Formatting and Linting
run-name: Run Linter and Formatter on ${{ github.event.pull_request.title }} by ${{ github.event.sender.login }}
run-name: Run client Linter and Formatter on ${{ github.event.pull_request.title }} by ${{ github.event.sender.login }}

on:
pull_request:
branches:
- main
workflow_dispatch:

permissions:
contents: write

jobs:
formatting:
runs-on: ubuntu-latest
defaults:
run:
shell: bash
working-directory: apps/api
working-directory: apps/client
environment: Preview
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.ref }}
- uses: oven-sh/setup-bun@v1
with:
bun-version: latest # or "latest", "canary", <sha>
- name: Install dependencies
run: bun install
- name: Format
run: bun run format
- name: Commit and push changes
uses: devops-infra/action-commit-push@master
- uses: EndBug/add-and-commit@v9 # You can change this to use a specific version.
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
commit_message: format code
target_branch: ${{ github.event.pull_request.head.ref }}
author_name: Github Action
message: "format(client): formatt code"
push: true
linting:
needs: formatting
runs-on: ubuntu-latest
defaults:
run:
shell: bash
working-directory: apps/api
working-directory: apps/client
environment: Preview
steps:
- uses: actions/checkout@v4
Expand Down
290 changes: 142 additions & 148 deletions apps/api/src/config/database/migrations/meta/0002_snapshot.json
Original file line number Diff line number Diff line change
@@ -1,149 +1,143 @@
{
"id": "71781081-042f-4718-bd3e-86fc59bd6f04",
"prevId": "310079ed-8707-4397-9545-ca476f27af94",
"version": "7",
"dialect": "postgresql",
"tables": {
"public.entry": {
"name": "entry",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "uuid",
"primaryKey": true,
"notNull": true,
"default": "gen_random_uuid()"
},
"user_id": {
"name": "user_id",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"title": {
"name": "title",
"type": "varchar(80)",
"primaryKey": false,
"notNull": true,
"default": "'Untintled'"
},
"created_at": {
"name": "created_at",
"type": "timestamp",
"primaryKey": false,
"notNull": true,
"default": "now()"
},
"updated_at": {
"name": "updated_at",
"type": "timestamp",
"primaryKey": false,
"notNull": true,
"default": "now()"
},
"word_count": {
"name": "word_count",
"type": "integer",
"primaryKey": false,
"notNull": true,
"default": 0
},
"content": {
"name": "content",
"type": "json",
"primaryKey": false,
"notNull": false,
"default": "'{\"type\":\"doc\",\"content\":[{\"type\":\"paragraph\"}]}'::json"
},
"is_private": {
"name": "is_private",
"type": "boolean",
"primaryKey": false,
"notNull": true,
"default": false
},
"end_date": {
"name": "end_date",
"type": "timestamp",
"primaryKey": false,
"notNull": false
}
},
"indexes": {},
"foreignKeys": {
"entry_user_id_users_id_fk": {
"name": "entry_user_id_users_id_fk",
"tableFrom": "entry",
"tableTo": "users",
"columnsFrom": [
"user_id"
],
"columnsTo": [
"id"
],
"onDelete": "cascade",
"onUpdate": "cascade"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {}
},
"public.users": {
"name": "users",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "uuid",
"primaryKey": true,
"notNull": true,
"default": "gen_random_uuid()"
},
"name": {
"name": "name",
"type": "varchar(50)",
"primaryKey": false,
"notNull": true
},
"email": {
"name": "email",
"type": "varchar(100)",
"primaryKey": false,
"notNull": true
},
"password": {
"name": "password",
"type": "varchar(255)",
"primaryKey": false,
"notNull": true
},
"end_date": {
"name": "end_date",
"type": "date",
"primaryKey": false,
"notNull": false
}
},
"indexes": {},
"foreignKeys": {},
"compositePrimaryKeys": {},
"uniqueConstraints": {
"users_email_unique": {
"name": "users_email_unique",
"nullsNotDistinct": false,
"columns": [
"email"
]
}
}
}
},
"enums": {},
"schemas": {},
"_meta": {
"columns": {},
"schemas": {},
"tables": {}
}
}
"id": "71781081-042f-4718-bd3e-86fc59bd6f04",
"prevId": "310079ed-8707-4397-9545-ca476f27af94",
"version": "7",
"dialect": "postgresql",
"tables": {
"public.entry": {
"name": "entry",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "uuid",
"primaryKey": true,
"notNull": true,
"default": "gen_random_uuid()"
},
"user_id": {
"name": "user_id",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"title": {
"name": "title",
"type": "varchar(80)",
"primaryKey": false,
"notNull": true,
"default": "'Untintled'"
},
"created_at": {
"name": "created_at",
"type": "timestamp",
"primaryKey": false,
"notNull": true,
"default": "now()"
},
"updated_at": {
"name": "updated_at",
"type": "timestamp",
"primaryKey": false,
"notNull": true,
"default": "now()"
},
"word_count": {
"name": "word_count",
"type": "integer",
"primaryKey": false,
"notNull": true,
"default": 0
},
"content": {
"name": "content",
"type": "json",
"primaryKey": false,
"notNull": false,
"default": "'{\"type\":\"doc\",\"content\":[{\"type\":\"paragraph\"}]}'::json"
},
"is_private": {
"name": "is_private",
"type": "boolean",
"primaryKey": false,
"notNull": true,
"default": false
},
"end_date": {
"name": "end_date",
"type": "timestamp",
"primaryKey": false,
"notNull": false
}
},
"indexes": {},
"foreignKeys": {
"entry_user_id_users_id_fk": {
"name": "entry_user_id_users_id_fk",
"tableFrom": "entry",
"tableTo": "users",
"columnsFrom": ["user_id"],
"columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "cascade"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {}
},
"public.users": {
"name": "users",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "uuid",
"primaryKey": true,
"notNull": true,
"default": "gen_random_uuid()"
},
"name": {
"name": "name",
"type": "varchar(50)",
"primaryKey": false,
"notNull": true
},
"email": {
"name": "email",
"type": "varchar(100)",
"primaryKey": false,
"notNull": true
},
"password": {
"name": "password",
"type": "varchar(255)",
"primaryKey": false,
"notNull": true
},
"end_date": {
"name": "end_date",
"type": "date",
"primaryKey": false,
"notNull": false
}
},
"indexes": {},
"foreignKeys": {},
"compositePrimaryKeys": {},
"uniqueConstraints": {
"users_email_unique": {
"name": "users_email_unique",
"nullsNotDistinct": false,
"columns": ["email"]
}
}
}
},
"enums": {},
"schemas": {},
"_meta": {
"columns": {},
"schemas": {},
"tables": {}
}
}
Loading