mirror of
https://github.com/logto-io/logto.git
synced 2025-03-10 22:22:45 -05:00
Merge pull request #44 from logto-io/gao--test-actions
feat: use yarn workspaces and add GitHub workflows
This commit is contained in:
commit
e1c910e4b7
11 changed files with 11233 additions and 18477 deletions
40
.github/workflows/core-main.yml
vendored
Normal file
40
.github/workflows/core-main.yml
vendored
Normal file
|
@ -0,0 +1,40 @@
|
|||
name: Core
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ master ]
|
||||
paths: [ 'packages/core/**' ]
|
||||
pull_request:
|
||||
branches: [ master ]
|
||||
paths: [ 'packages/core/**' ]
|
||||
|
||||
jobs:
|
||||
main:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
# https://github.com/actions/cache/blob/main/examples.md#node---yarn
|
||||
- name: Get yarn cache directory path
|
||||
id: yarn-cache-dir-path
|
||||
run: echo "::set-output name=dir::$(yarn cache dir)"
|
||||
|
||||
- uses: actions/cache@v2
|
||||
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
|
||||
with:
|
||||
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
|
||||
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-yarn-
|
||||
|
||||
- name: Install packages
|
||||
run: yarn
|
||||
|
||||
- name: Lint
|
||||
working-directory: packages/core
|
||||
run: yarn lint
|
||||
|
||||
- name: Build
|
||||
working-directory: packages/core
|
||||
run: yarn build
|
40
.github/workflows/schemas-main.yml
vendored
Normal file
40
.github/workflows/schemas-main.yml
vendored
Normal file
|
@ -0,0 +1,40 @@
|
|||
name: Schemas
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ master ]
|
||||
paths: [ 'packages/schemas/**' ]
|
||||
pull_request:
|
||||
branches: [ master ]
|
||||
paths: [ 'packages/schemas/**' ]
|
||||
|
||||
jobs:
|
||||
main:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
# https://github.com/actions/cache/blob/main/examples.md#node---yarn
|
||||
- name: Get yarn cache directory path
|
||||
id: yarn-cache-dir-path
|
||||
run: echo "::set-output name=dir::$(yarn cache dir)"
|
||||
|
||||
- uses: actions/cache@v2
|
||||
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
|
||||
with:
|
||||
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
|
||||
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-yarn-
|
||||
|
||||
- name: Install packages
|
||||
run: yarn
|
||||
|
||||
- name: Lint
|
||||
working-directory: packages/schemas
|
||||
run: yarn lint
|
||||
|
||||
- name: Build
|
||||
working-directory: packages/schemas
|
||||
run: yarn build
|
6
.github/workflows/ui-main.yml
vendored
6
.github/workflows/ui-main.yml
vendored
|
@ -8,10 +8,6 @@ on:
|
|||
branches: [ master ]
|
||||
paths: [ 'packages/ui/**' ]
|
||||
|
||||
defaults:
|
||||
run:
|
||||
working-directory: packages/ui
|
||||
|
||||
jobs:
|
||||
main:
|
||||
runs-on: ubuntu-latest
|
||||
|
@ -36,7 +32,9 @@ jobs:
|
|||
run: yarn
|
||||
|
||||
- name: Lint
|
||||
working-directory: packages/ui
|
||||
run: yarn lint && yarn stylelint
|
||||
|
||||
- name: Build
|
||||
working-directory: packages/ui
|
||||
run: yarn build
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
{
|
||||
"packages": [
|
||||
"packages/*"
|
||||
],
|
||||
"version": "0.1.0",
|
||||
"npmClient": "yarn"
|
||||
"npmClient": "yarn",
|
||||
"useWorkspaces": true
|
||||
}
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
"scripts": {
|
||||
"lerna": "lerna",
|
||||
"bootstrap": "lerna bootstrap",
|
||||
"prepare": "husky install"
|
||||
"prepare": "husky install && lerna run --stream prepack"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@commitlint/cli": "^13.1.0",
|
||||
|
@ -12,5 +12,9 @@
|
|||
"husky": "^7.0.1",
|
||||
"lerna": "^4.0.0",
|
||||
"typescript": "^4.3.5"
|
||||
},
|
||||
"workspaces": {
|
||||
"packages": ["packages/*"],
|
||||
"nohoist": ["**/module-alias"]
|
||||
}
|
||||
}
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -13,7 +13,7 @@
|
|||
"generate": "ts-node src/gen/index.ts && eslint --format pretty \"src/db-entries/**\" --fix",
|
||||
"build": "yarn generate && rm -rf lib/ && tsc --p tsconfig.build.json",
|
||||
"lint": "eslint --format pretty \"src/**\"",
|
||||
"prepare": "yarn build"
|
||||
"prepack": "yarn build"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=14.15.0",
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -9,7 +9,7 @@
|
|||
"dev:razzle": "razzle start",
|
||||
"start": "PORT=5000 concurrently -c \"blue,cyan\" \"yarn:dev:tsc\" -k \"yarn:dev:razzle\"",
|
||||
"start:prod": "NODE_ENV=production node build/server.js",
|
||||
"build": "tsc -b && razzle build",
|
||||
"build": "tsc -b && razzle build --noninteractive",
|
||||
"lint": "eslint --format pretty --ext .ts --ext .tsx src",
|
||||
"stylelint": "stylelint \"src/**/*.scss\"",
|
||||
"test": "razzle test --env=jsdom"
|
||||
|
|
11723
packages/ui/yarn.lock
11723
packages/ui/yarn.lock
File diff suppressed because it is too large
Load diff
Loading…
Add table
Reference in a new issue