Skip to content

Commit

Permalink
build(app): fix build errors in the ci
Browse files Browse the repository at this point in the history
  • Loading branch information
tericcabrel committed May 22, 2024
1 parent 8b8c58b commit 5dc2b0d
Show file tree
Hide file tree
Showing 13 changed files with 25 additions and 18 deletions.
2 changes: 1 addition & 1 deletion .github/actions/install-dependencies/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ runs:
shell: bash
run: |
corepack enable
yarn set version 4.2.1
yarn set version 4.2.2
- name: Install projects dependencies
shell: bash
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/build-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,9 @@ jobs:
run: sudo systemctl start mysql.service

- name: Run tests
run: yarn test
run: |
yarn prisma migrate dev --schema=packages/domain/prisma/schema.prisma
yarn test
version:
runs-on: ubuntu-latest
Expand Down
8 changes: 5 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
MYSQL_DATABASE: test
MYSQL_PORT: 3306
DATABASE_URL: mysql:https://root:[email protected]:3306/test
ADMIN_PASSWORD: admin_password
TEST_DATABASE_URL: mysql:https://root:[email protected]:3306/test
CONVERTKIT_API_KEY: api_key
CONVERTKIT_FORM_ID: form_id
outputs:
Expand All @@ -43,7 +43,9 @@ jobs:
run: sudo systemctl start mysql.service

- name: Run tests
run: yarn test
run: |
yarn prisma migrate dev --schema=packages/domain/prisma/schema.prisma
yarn test
preview-frontend:
runs-on: ubuntu-latest
Expand All @@ -56,7 +58,7 @@ jobs:
- name: Install Yarn 4
run: |
corepack enable
yarn set version 4.2.1
yarn set version 4.2.2
- name: Install Vercel CLI
run: npm install --global vercel@latest
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/deploy-frontend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
- name: Install Yarn 4
run: |
corepack enable
yarn set version 4.2.1
yarn set version 4.2.2
- name: Install Vercel CLI
run: npm install --global vercel@latest
Expand Down
8 changes: 4 additions & 4 deletions apps/core/README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# Snipcode Core

This is the core backend of Snipcode. All the business logic behind this application is implemented here.
This is the backend of Snipcode, containing the business logics related to .

## Tech Stack
* Node.js
* Typescript
* TypeScript
* GraphQL
* MySQL 8 through PlanetScale
* MySQL
* Prisma

## Prerequisites
Expand All @@ -15,13 +15,13 @@ Make sure you have this tools installed before running the project
* NPM or Yarn
* Docker
* AWS CLI v2
* MySQL 8 on PlanetScale

## Packages dependencies
We use Yarn workspace to create packages we can share with other applications.
These packages are located in the folder `packages`, so you might need to change the code of one or many packages to implement a feature.
Here are the packages used in this project:

* [@snipcode/database](../../packages/database)
* [@snipcode/domain](../../packages/domain)
* [@snipcode/logger](../../packages/logger)
* [@snipcode/utils](../../packages/utils)
Expand Down
3 changes: 0 additions & 3 deletions apps/core/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,5 @@
{
"path": "../../packages/domain"
},
{
"path": "../../packages/database"
}
]
}
2 changes: 1 addition & 1 deletion apps/functions/code-embed/scripts/setup-layer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ mkdir -p layers/shiki-layer/nodejs/node_modules

cd ../../..

yarn workspace @snipcode/database db:generate
yarn workspace @snipcode/domain db:generate

cp -r node_modules/.prisma apps/functions/code-embed/layers/prisma-layer/nodejs/node_modules

Expand Down
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,10 @@
"scripts": {
"build": "turbo run build",
"build:prod": "turbo run build:prod",
"build:backend": "turbo run build --filter=!@snipcode/web",
"dev": "turbo run dev --no-cache --parallel --continue",
"lint": "turbo run lint",
"test": "turbo run test",
"clean": "turbo run clean && rm -rf .turbo",
"clean": "turbo run clean --force && rm -rf .turbo",
"format": "prettier --write \"**/*.{ts,tsx,md}\"",
"cache:login": "turbo login",
"cache:link": "turbo link",
Expand Down
2 changes: 1 addition & 1 deletion packages/embed/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ nano .env

Start the database locally
```shell
yarn workspace @snipcode/database db:dev
yarn workspace @snipcode/domain db:dev
```

## Start the watcher for the CSS and JS
Expand Down
1 change: 1 addition & 0 deletions packages/embed/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
"test": "jest"
},
"devDependencies": {
"@snipcode/domain": "workspace:*",
"@types/express": "4.17.21",
"express": "4.19.1",
"nodemon": "2.0.22",
Expand Down
5 changes: 5 additions & 0 deletions packages/embed/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,10 @@
"include": ["src", "__tests__", "index.ts"],
"exclude": [
"node_modules"
],
"references": [
{
"path": "../../packages/domain"
}
]
}
2 changes: 1 addition & 1 deletion turbo.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
"DATABASE_URL"
]
},
"@snipcode/database#build": {
"@snipcode/domain#build": {
"dependsOn": [
"^build",
"prebuild"
Expand Down
1 change: 1 addition & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5459,6 +5459,7 @@ __metadata:
version: 0.0.0-use.local
resolution: "@snipcode/embed@workspace:packages/embed"
dependencies:
"@snipcode/domain": "workspace:*"
"@types/express": "npm:4.17.21"
express: "npm:4.19.1"
nodemon: "npm:2.0.22"
Expand Down

0 comments on commit 5dc2b0d

Please sign in to comment.