mirror of
https://github.com/usememos/memos.git
synced 2024-12-26 04:42:54 +03:00
parent
a654a1cb88
commit
648634d376
18
.github/workflows/e2e-test.yml
vendored
18
.github/workflows/e2e-test.yml
vendored
@ -25,16 +25,20 @@ jobs:
|
|||||||
|
|
||||||
- name: Run Docker container
|
- name: Run Docker container
|
||||||
run: docker run -d -p 5230:5230 neosmemo/memos:e2e
|
run: docker run -d -p 5230:5230 neosmemo/memos:e2e
|
||||||
|
|
||||||
|
- uses: pnpm/action-setup@v2.2.4
|
||||||
|
with:
|
||||||
|
version: 8.0.0
|
||||||
|
|
||||||
- uses: actions/setup-node@v3
|
- uses: actions/setup-node@v3
|
||||||
with:
|
with:
|
||||||
node-version: 18
|
node-version: 18
|
||||||
cache: 'yarn'
|
cache: "pnpm"
|
||||||
cache-dependency-path: ./web/yarn.lock
|
cache-dependency-path: ./web/pnpm-lock.yaml
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
working-directory: web
|
working-directory: web
|
||||||
run: yarn
|
run: pnpm install
|
||||||
|
|
||||||
- name: Install Playwright Browsers
|
- name: Install Playwright Browsers
|
||||||
working-directory: web
|
working-directory: web
|
||||||
@ -43,14 +47,14 @@ jobs:
|
|||||||
- name: Run Playwright tests
|
- name: Run Playwright tests
|
||||||
working-directory: web
|
working-directory: web
|
||||||
run: npx playwright test
|
run: npx playwright test
|
||||||
|
|
||||||
- uses: actions/upload-artifact@v3
|
- uses: actions/upload-artifact@v3
|
||||||
if: always()
|
if: always()
|
||||||
with:
|
with:
|
||||||
name: playwright-report
|
name: playwright-report
|
||||||
path: web/playwright-report/
|
path: web/playwright-report/
|
||||||
retention-days: 30
|
retention-days: 30
|
||||||
|
|
||||||
- uses: actions/upload-artifact@v3
|
- uses: actions/upload-artifact@v3
|
||||||
if: always()
|
if: always()
|
||||||
with:
|
with:
|
||||||
|
22
.github/workflows/frontend-tests.yml
vendored
22
.github/workflows/frontend-tests.yml
vendored
@ -11,28 +11,34 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
|
- uses: pnpm/action-setup@v2.2.4
|
||||||
|
with:
|
||||||
|
version: 8.0.0
|
||||||
- uses: actions/setup-node@v3
|
- uses: actions/setup-node@v3
|
||||||
with:
|
with:
|
||||||
node-version: "18"
|
node-version: "18"
|
||||||
cache: yarn
|
cache: pnpm
|
||||||
cache-dependency-path: "web/yarn.lock"
|
cache-dependency-path: "web/pnpm-lock.yaml"
|
||||||
- run: yarn
|
- run: pnpm install
|
||||||
working-directory: web
|
working-directory: web
|
||||||
- name: Run eslint check
|
- name: Run eslint check
|
||||||
run: yarn lint
|
run: pnpm lint
|
||||||
working-directory: web
|
working-directory: web
|
||||||
|
|
||||||
frontend-build:
|
frontend-build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
|
- uses: pnpm/action-setup@v2.2.4
|
||||||
|
with:
|
||||||
|
version: 8.0.0
|
||||||
- uses: actions/setup-node@v3
|
- uses: actions/setup-node@v3
|
||||||
with:
|
with:
|
||||||
node-version: "18"
|
node-version: "18"
|
||||||
cache: yarn
|
cache: pnpm
|
||||||
cache-dependency-path: "web/yarn.lock"
|
cache-dependency-path: "web/pnpm-lock.yaml"
|
||||||
- run: yarn
|
- run: pnpm install
|
||||||
working-directory: web
|
working-directory: web
|
||||||
- name: Run frontend build
|
- name: Run frontend build
|
||||||
run: yarn build
|
run: pnpm build
|
||||||
working-directory: web
|
working-directory: web
|
||||||
|
@ -2,13 +2,13 @@
|
|||||||
FROM node:18.12.1-alpine3.16 AS frontend
|
FROM node:18.12.1-alpine3.16 AS frontend
|
||||||
WORKDIR /frontend-build
|
WORKDIR /frontend-build
|
||||||
|
|
||||||
COPY ./web/package.json ./web/yarn.lock ./
|
COPY ./web/package.json ./web/pnpm-lock.yaml ./
|
||||||
|
|
||||||
RUN yarn
|
RUN npm install -g pnpm && pnpm i --frozen-lockfile
|
||||||
|
|
||||||
COPY ./web/ .
|
COPY ./web/ .
|
||||||
|
|
||||||
RUN yarn build
|
RUN pnpm build
|
||||||
|
|
||||||
# Build backend exec file.
|
# Build backend exec file.
|
||||||
FROM golang:1.19.3-alpine3.16 AS backend
|
FROM golang:1.19.3-alpine3.16 AS backend
|
||||||
|
@ -15,7 +15,7 @@ Memos is built with a curated tech stack. It is optimized for developer experien
|
|||||||
- [Go](https://golang.org/doc/install)
|
- [Go](https://golang.org/doc/install)
|
||||||
- [Air](https://github.com/cosmtrek/air#installation) for backend live reload
|
- [Air](https://github.com/cosmtrek/air#installation) for backend live reload
|
||||||
- [Node.js](https://nodejs.org/)
|
- [Node.js](https://nodejs.org/)
|
||||||
- [yarn](https://yarnpkg.com/getting-started/install)
|
- [pnpm](https://pnpm.io/installation)
|
||||||
|
|
||||||
## Steps
|
## Steps
|
||||||
|
|
||||||
@ -34,7 +34,7 @@ Memos is built with a curated tech stack. It is optimized for developer experien
|
|||||||
3. start frontend dev server
|
3. start frontend dev server
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
cd web && yarn && yarn dev
|
cd web && pnpm i && pnpm dev
|
||||||
```
|
```
|
||||||
|
|
||||||
Memos should now be running at [http://localhost:3001](http://localhost:3001) and change either frontend or backend code would trigger live reload.
|
Memos should now be running at [http://localhost:3001](http://localhost:3001) and change either frontend or backend code would trigger live reload.
|
||||||
|
1
web/.gitignore
vendored
1
web/.gitignore
vendored
@ -4,7 +4,6 @@ dist
|
|||||||
dist-ssr
|
dist-ssr
|
||||||
*.local
|
*.local
|
||||||
|
|
||||||
.yarn/*
|
|
||||||
/test-results/
|
/test-results/
|
||||||
/playwright-report/
|
/playwright-report/
|
||||||
/playwright/.cache/
|
/playwright/.cache/
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@emotion/react": "^11.10.5",
|
"@emotion/react": "^11.10.5",
|
||||||
"@emotion/styled": "^11.10.5",
|
"@emotion/styled": "^11.10.5",
|
||||||
"@mui/joy": "^5.0.0-alpha.67",
|
"@mui/joy": "^5.0.0-alpha.75",
|
||||||
"@radix-ui/react-tooltip": "^1.0.5",
|
"@radix-ui/react-tooltip": "^1.0.5",
|
||||||
"@reduxjs/toolkit": "^1.8.1",
|
"@reduxjs/toolkit": "^1.8.1",
|
||||||
"axios": "^0.27.2",
|
"axios": "^0.27.2",
|
||||||
@ -43,17 +43,17 @@
|
|||||||
"@types/semver": "^7.3.13",
|
"@types/semver": "^7.3.13",
|
||||||
"@typescript-eslint/eslint-plugin": "^5.6.0",
|
"@typescript-eslint/eslint-plugin": "^5.6.0",
|
||||||
"@typescript-eslint/parser": "^5.6.0",
|
"@typescript-eslint/parser": "^5.6.0",
|
||||||
"@vitejs/plugin-react-swc": "^3.0.0",
|
"@vitejs/plugin-react-swc": "^3.3.0",
|
||||||
"autoprefixer": "^10.4.2",
|
"autoprefixer": "^10.4.2",
|
||||||
"eslint": "^8.4.1",
|
"eslint": "^8.4.1",
|
||||||
"eslint-config-prettier": "^8.6.0",
|
"eslint-config-prettier": "^8.6.0",
|
||||||
"eslint-plugin-prettier": "^4.2.1",
|
"eslint-plugin-prettier": "^4.2.1",
|
||||||
"eslint-plugin-react": "^7.27.1",
|
"eslint-plugin-react": "^7.27.1",
|
||||||
"less": "^4.1.1",
|
"less": "^4.1.1",
|
||||||
"postcss": "^8.4.5",
|
"postcss": "^8.4.21",
|
||||||
"prettier": "2.5.1",
|
"prettier": "2.5.1",
|
||||||
"terser": "^5.16.1",
|
"terser": "^5.16.1",
|
||||||
"typescript": "^4.3.2",
|
"typescript": "^5.0.4",
|
||||||
"vite": "^4.0.0"
|
"vite": "^4.2.1"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
3831
web/pnpm-lock.yaml
Normal file
3831
web/pnpm-lock.yaml
Normal file
File diff suppressed because it is too large
Load Diff
@ -197,7 +197,7 @@ const CreateIdentityProviderDialog: React.FC<Props> = (props: Props) => {
|
|||||||
toast.success(t("setting.sso-section.sso-created", { name: basicInfo.name }));
|
toast.success(t("setting.sso-section.sso-created", { name: basicInfo.name }));
|
||||||
} else {
|
} else {
|
||||||
await api.patchIdentityProvider({
|
await api.patchIdentityProvider({
|
||||||
id: identityProvider?.id,
|
id: identityProvider.id,
|
||||||
type: type,
|
type: type,
|
||||||
...basicInfo,
|
...basicInfo,
|
||||||
config: {
|
config: {
|
||||||
|
3416
web/yarn.lock
3416
web/yarn.lock
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user