mirror of
https://github.com/usememos/memos.git
synced 2024-12-25 12:23:09 +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
|
||||
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
|
||||
with:
|
||||
node-version: 18
|
||||
cache: 'yarn'
|
||||
cache-dependency-path: ./web/yarn.lock
|
||||
|
||||
cache: "pnpm"
|
||||
cache-dependency-path: ./web/pnpm-lock.yaml
|
||||
|
||||
- name: Install dependencies
|
||||
working-directory: web
|
||||
run: yarn
|
||||
run: pnpm install
|
||||
|
||||
- name: Install Playwright Browsers
|
||||
working-directory: web
|
||||
@ -43,14 +47,14 @@ jobs:
|
||||
- name: Run Playwright tests
|
||||
working-directory: web
|
||||
run: npx playwright test
|
||||
|
||||
|
||||
- uses: actions/upload-artifact@v3
|
||||
if: always()
|
||||
with:
|
||||
name: playwright-report
|
||||
path: web/playwright-report/
|
||||
retention-days: 30
|
||||
|
||||
|
||||
- uses: actions/upload-artifact@v3
|
||||
if: always()
|
||||
with:
|
||||
|
22
.github/workflows/frontend-tests.yml
vendored
22
.github/workflows/frontend-tests.yml
vendored
@ -11,28 +11,34 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: pnpm/action-setup@v2.2.4
|
||||
with:
|
||||
version: 8.0.0
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: "18"
|
||||
cache: yarn
|
||||
cache-dependency-path: "web/yarn.lock"
|
||||
- run: yarn
|
||||
cache: pnpm
|
||||
cache-dependency-path: "web/pnpm-lock.yaml"
|
||||
- run: pnpm install
|
||||
working-directory: web
|
||||
- name: Run eslint check
|
||||
run: yarn lint
|
||||
run: pnpm lint
|
||||
working-directory: web
|
||||
|
||||
frontend-build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: pnpm/action-setup@v2.2.4
|
||||
with:
|
||||
version: 8.0.0
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: "18"
|
||||
cache: yarn
|
||||
cache-dependency-path: "web/yarn.lock"
|
||||
- run: yarn
|
||||
cache: pnpm
|
||||
cache-dependency-path: "web/pnpm-lock.yaml"
|
||||
- run: pnpm install
|
||||
working-directory: web
|
||||
- name: Run frontend build
|
||||
run: yarn build
|
||||
run: pnpm build
|
||||
working-directory: web
|
||||
|
@ -2,13 +2,13 @@
|
||||
FROM node:18.12.1-alpine3.16 AS frontend
|
||||
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/ .
|
||||
|
||||
RUN yarn build
|
||||
RUN pnpm build
|
||||
|
||||
# Build backend exec file.
|
||||
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)
|
||||
- [Air](https://github.com/cosmtrek/air#installation) for backend live reload
|
||||
- [Node.js](https://nodejs.org/)
|
||||
- [yarn](https://yarnpkg.com/getting-started/install)
|
||||
- [pnpm](https://pnpm.io/installation)
|
||||
|
||||
## Steps
|
||||
|
||||
@ -34,7 +34,7 @@ Memos is built with a curated tech stack. It is optimized for developer experien
|
||||
3. start frontend dev server
|
||||
|
||||
```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.
|
||||
|
1
web/.gitignore
vendored
1
web/.gitignore
vendored
@ -4,7 +4,6 @@ dist
|
||||
dist-ssr
|
||||
*.local
|
||||
|
||||
.yarn/*
|
||||
/test-results/
|
||||
/playwright-report/
|
||||
/playwright/.cache/
|
||||
|
@ -9,7 +9,7 @@
|
||||
"dependencies": {
|
||||
"@emotion/react": "^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",
|
||||
"@reduxjs/toolkit": "^1.8.1",
|
||||
"axios": "^0.27.2",
|
||||
@ -43,17 +43,17 @@
|
||||
"@types/semver": "^7.3.13",
|
||||
"@typescript-eslint/eslint-plugin": "^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",
|
||||
"eslint": "^8.4.1",
|
||||
"eslint-config-prettier": "^8.6.0",
|
||||
"eslint-plugin-prettier": "^4.2.1",
|
||||
"eslint-plugin-react": "^7.27.1",
|
||||
"less": "^4.1.1",
|
||||
"postcss": "^8.4.5",
|
||||
"postcss": "^8.4.21",
|
||||
"prettier": "2.5.1",
|
||||
"terser": "^5.16.1",
|
||||
"typescript": "^4.3.2",
|
||||
"vite": "^4.0.0"
|
||||
"typescript": "^5.0.4",
|
||||
"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 }));
|
||||
} else {
|
||||
await api.patchIdentityProvider({
|
||||
id: identityProvider?.id,
|
||||
id: identityProvider.id,
|
||||
type: type,
|
||||
...basicInfo,
|
||||
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