mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-11 20:08:37 +00:00
Merge branch 'master'
Conflicts: .vscode/settings.json package.json packages/data-center/package.json pnpm-lock.yaml
This commit is contained in:
7
.github/ISSUE_TEMPLATE.md
vendored
Normal file
7
.github/ISSUE_TEMPLATE.md
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
<!--
|
||||
For bug reports 🐛, please provide:
|
||||
- The necessary steps to reproduce the issue.
|
||||
- The browser and platform you tested, if this may be related to compatibility.
|
||||
|
||||
For general discussion and feature requests, please use 👉 https://community.affine.pro/
|
||||
-->
|
||||
0
.github/ISSUE_TEMPLATE/.gitkeep
vendored
Normal file
0
.github/ISSUE_TEMPLATE/.gitkeep
vendored
Normal file
45
.github/ISSUE_TEMPLATE/bug-report-alpha.yml
vendored
45
.github/ISSUE_TEMPLATE/bug-report-alpha.yml
vendored
@@ -1,45 +0,0 @@
|
||||
name: 🐛 Bug report (Alpha)
|
||||
description: "Report a reproducible bug or regression for https://pathfinder.affine.pro"
|
||||
title: "[bug]: "
|
||||
labels: ["bug", "alpha"]
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: Thanks for taking the time to fill out this bug report!
|
||||
- type: input
|
||||
id: description
|
||||
attributes:
|
||||
label: Describe the bug
|
||||
placeholder: A clear and concise description of what the bug is.
|
||||
- type: textarea
|
||||
id: reproduce
|
||||
attributes:
|
||||
label: To Reproduce
|
||||
placeholder: "Steps to reproduce the behavior\n1. Go to '...'\n2. Click on '....'\n3. Scroll down to '....'\n4. See error"
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: screenshots
|
||||
attributes:
|
||||
label: Screenshots
|
||||
placeholder: If applicable, add screenshots to help explain your problem.
|
||||
- type: textarea
|
||||
id: expected
|
||||
attributes:
|
||||
label: Expected behavior
|
||||
placeholder: A clear and concise description of what you expected to happen.
|
||||
- type: input
|
||||
id: platform
|
||||
attributes:
|
||||
label: Platform
|
||||
placeholder: e.g. MacOS, Windows10...
|
||||
- type: input
|
||||
id: browser
|
||||
attributes:
|
||||
label: Browser
|
||||
placeholder: e.g. Chrome, Safari
|
||||
- type: textarea
|
||||
id: additional
|
||||
attributes:
|
||||
label: Additional context
|
||||
placeholder: Add any other context about the problem here.
|
||||
45
.github/ISSUE_TEMPLATE/bug-report-pre-alpha.yml
vendored
45
.github/ISSUE_TEMPLATE/bug-report-pre-alpha.yml
vendored
@@ -1,45 +0,0 @@
|
||||
name: 🐛 Bug report (Pre-Alpha)
|
||||
description: "Report a reproducible bug or regression for https://livedemo.affine.pro"
|
||||
title: "[bug]: "
|
||||
labels: ["bug", "pre-alpha"]
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: Thanks for taking the time to fill out this bug report!
|
||||
- type: input
|
||||
id: description
|
||||
attributes:
|
||||
label: Describe the bug
|
||||
placeholder: A clear and concise description of what the bug is.
|
||||
- type: textarea
|
||||
id: reproduce
|
||||
attributes:
|
||||
label: To Reproduce
|
||||
placeholder: "Steps to reproduce the behavior\n1. Go to '...'\n2. Click on '....'\n3. Scroll down to '....'\n4. See error"
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: screenshots
|
||||
attributes:
|
||||
label: Screenshots
|
||||
placeholder: If applicable, add screenshots to help explain your problem.
|
||||
- type: textarea
|
||||
id: expected
|
||||
attributes:
|
||||
label: Expected behavior
|
||||
placeholder: A clear and concise description of what you expected to happen.
|
||||
- type: input
|
||||
id: platform
|
||||
attributes:
|
||||
label: Platform
|
||||
placeholder: e.g. MacOS, Windows10...
|
||||
- type: input
|
||||
id: browser
|
||||
attributes:
|
||||
label: Browser
|
||||
placeholder: e.g. Chrome, Safari
|
||||
- type: textarea
|
||||
id: additional
|
||||
attributes:
|
||||
label: Additional context
|
||||
placeholder: Add any other context about the problem here.
|
||||
11
.github/ISSUE_TEMPLATE/config.yml
vendored
11
.github/ISSUE_TEMPLATE/config.yml
vendored
@@ -1,11 +0,0 @@
|
||||
blank_issues_enabled: true
|
||||
contact_links:
|
||||
- name: 💭 Questions and Help - Reddit
|
||||
url: https://www.reddit.com/r/Affine/
|
||||
about: Please ask and answer questions here.
|
||||
- name: 💬 Questions and Help - Telegram
|
||||
url: https://t.me/affineworkos
|
||||
about: Please ask and answer questions here.
|
||||
- name: 🗯 Questions and Help - Discord
|
||||
url: https://discord.gg/yz6tGVsf5p
|
||||
about: Please ask and answer questions here.
|
||||
31
.github/ISSUE_TEMPLATE/feature-request.yml
vendored
31
.github/ISSUE_TEMPLATE/feature-request.yml
vendored
@@ -1,31 +0,0 @@
|
||||
name: ✨ Feature request
|
||||
description: An idea or request for new functionality
|
||||
title: "[feature]: "
|
||||
labels: ["enhancement"]
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: Thanks for taking the time to fill out this feature request!
|
||||
- type: textarea
|
||||
id: description
|
||||
attributes:
|
||||
label: 1~3 main use cases of the proposed feature
|
||||
description: e.g. As a ..., I have many tasks scattered across documents, and I want to have a unified entry to view these tasks.
|
||||
placeholder: e.g. As a ...
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: solution
|
||||
attributes:
|
||||
label: Ideas for solution
|
||||
placeholder: e.g. A task view can be added to view all tasks.
|
||||
- type: input
|
||||
id: userType
|
||||
attributes:
|
||||
label: what types of users can benefit from using your proposed feature
|
||||
placeholder: busy student
|
||||
- type: textarea
|
||||
id: additional
|
||||
attributes:
|
||||
label: Additional context
|
||||
placeholder: Add any other context or screenshots about the feature request here.
|
||||
31
.github/ISSUE_TEMPLATE/improvement-request.yml
vendored
31
.github/ISSUE_TEMPLATE/improvement-request.yml
vendored
@@ -1,31 +0,0 @@
|
||||
name: 🪄 Improvement request
|
||||
description: An improvement to existing functionality
|
||||
title: "[improvement]: "
|
||||
labels: ["improvement"]
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: Thanks for taking the time to fill out this improvement request!
|
||||
- type: textarea
|
||||
id: description
|
||||
attributes:
|
||||
label: 1~3 main use cases of the proposed improvement
|
||||
description: e.g. As a ..., I have many tasks scattered across documents, and I want to have a unified entry to view these tasks.
|
||||
placeholder: e.g. As a ...
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: solution
|
||||
attributes:
|
||||
label: Ideas for solution
|
||||
placeholder: e.g. A task view can be added to view all tasks.
|
||||
- type: input
|
||||
id: userType
|
||||
attributes:
|
||||
label: what types of users can benefit from using your proposed improvement
|
||||
placeholder: busy student
|
||||
- type: textarea
|
||||
id: additional
|
||||
attributes:
|
||||
label: Additional context
|
||||
placeholder: Add any other context or screenshots about the improvement request here.
|
||||
7
.github/ISSUE_TEMPLATE/question.md
vendored
7
.github/ISSUE_TEMPLATE/question.md
vendored
@@ -1,7 +0,0 @@
|
||||
---
|
||||
name: I have a question
|
||||
about: Feel free to ask us your questions!
|
||||
title: '[Question]'
|
||||
labels: ''
|
||||
assignees: ''
|
||||
---
|
||||
54
.github/workflows/build.yml
vendored
54
.github/workflows/build.yml
vendored
@@ -67,18 +67,16 @@ jobs:
|
||||
|
||||
lint:
|
||||
name: Lint and E2E Test
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: self-hosted
|
||||
environment: development
|
||||
needs: build
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@v3
|
||||
- uses: pnpm/action-setup@v2
|
||||
with:
|
||||
version: 'latest'
|
||||
|
||||
- name: Use Node.js
|
||||
uses: actions/setup-node@v2
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 18.x
|
||||
cache: 'pnpm'
|
||||
@@ -96,8 +94,6 @@ jobs:
|
||||
|
||||
- name: Install dependencies
|
||||
run: pnpm install
|
||||
env:
|
||||
NODE_AUTH_TOKEN: ${{ secrets.NPM_GITHUB_AUTH_TOKEN }}
|
||||
|
||||
- name: Download artifact
|
||||
uses: actions/download-artifact@v3
|
||||
@@ -105,20 +101,40 @@ jobs:
|
||||
name: artifact
|
||||
path: packages/app/.next/
|
||||
|
||||
- name: Lint & E2E Test
|
||||
- name: Lint & E2E Test & Unit Test
|
||||
run: |
|
||||
pnpm lint --max-warnings=0
|
||||
PLAYWRIGHT_BROWSERS_PATH=0 npx playwright install chromium
|
||||
PLAYWRIGHT_BROWSERS_PATH=0 pnpm test
|
||||
PLAYWRIGHT_BROWSERS_PATH=0 pnpm test:dc
|
||||
env:
|
||||
NEXT_PUBLIC_FIREBASE_API_KEY: ${{ secrets.NEXT_PUBLIC_FIREBASE_API_KEY }}
|
||||
NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN: ${{ secrets.NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN }}
|
||||
NEXT_PUBLIC_FIREBASE_PROJECT_ID: ${{ secrets.NEXT_PUBLIC_FIREBASE_PROJECT_ID }}
|
||||
NEXT_PUBLIC_FIREBASE_STORAGE_BUCKET: ${{ secrets.NEXT_PUBLIC_FIREBASE_STORAGE_BUCKET }}
|
||||
NEXT_PUBLIC_FIREBASE_MESSAGING_SENDER_ID: ${{ secrets.NEXT_PUBLIC_FIREBASE_MESSAGING_SENDER_ID }}
|
||||
NEXT_PUBLIC_FIREBASE_APP_ID: ${{ secrets.NEXT_PUBLIC_FIREBASE_APP_ID }}
|
||||
NEXT_PUBLIC_FIREBASE_MEASUREMENT_ID: ${{ secrets.NEXT_PUBLIC_FIREBASE_MEASUREMENT_ID }}
|
||||
npx playwright install chromium
|
||||
pnpm run test:coverage
|
||||
pnpm run test:unit
|
||||
# env:
|
||||
# NEXT_PUBLIC_FIREBASE_API_KEY: ${{ secrets.NEXT_PUBLIC_FIREBASE_API_KEY }}
|
||||
# NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN: ${{ secrets.NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN }}
|
||||
# NEXT_PUBLIC_FIREBASE_PROJECT_ID: ${{ secrets.NEXT_PUBLIC_FIREBASE_PROJECT_ID }}
|
||||
# NEXT_PUBLIC_FIREBASE_STORAGE_BUCKET: ${{ secrets.NEXT_PUBLIC_FIREBASE_STORAGE_BUCKET }}
|
||||
# NEXT_PUBLIC_FIREBASE_MESSAGING_SENDER_ID: ${{ secrets.NEXT_PUBLIC_FIREBASE_MESSAGING_SENDER_ID }}
|
||||
# NEXT_PUBLIC_FIREBASE_APP_ID: ${{ secrets.NEXT_PUBLIC_FIREBASE_APP_ID }}
|
||||
# NEXT_PUBLIC_FIREBASE_MEASUREMENT_ID: ${{ secrets.NEXT_PUBLIC_FIREBASE_MEASUREMENT_ID }}
|
||||
|
||||
- name: Collect code coverage report
|
||||
run: pnpm exec nyc report -t .nyc_output --report-dir .coverage --reporter=lcov
|
||||
|
||||
- name: Upload e2e test coverage results
|
||||
uses: codecov/codecov-action@v3
|
||||
with:
|
||||
token: ${{ secrets.CODECOV_TOKEN }}
|
||||
files: ./.coverage/lcov.info
|
||||
flags: e2etest
|
||||
name: affine
|
||||
fail_ci_if_error: true
|
||||
|
||||
- name: Upload test results
|
||||
if: ${{ failure() }}
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: test-results-main
|
||||
path: ./test-results
|
||||
if-no-files-found: ignore
|
||||
|
||||
build-community:
|
||||
name: Build Community
|
||||
|
||||
48
.github/workflows/tests.yml
vendored
48
.github/workflows/tests.yml
vendored
@@ -1,48 +0,0 @@
|
||||
name: Unit Tests
|
||||
on:
|
||||
push:
|
||||
branches: [master]
|
||||
pull_request:
|
||||
branches: [master]
|
||||
jobs:
|
||||
test:
|
||||
timeout-minutes: 60
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- uses: pnpm/action-setup@v2
|
||||
with:
|
||||
version: 'latest'
|
||||
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 16
|
||||
registry-url: https://npm.pkg.github.com
|
||||
scope: '@toeverything'
|
||||
cache: 'pnpm'
|
||||
|
||||
- run: node scripts/module-resolve/ci.cjs
|
||||
|
||||
- name: Install dependencies
|
||||
run: pnpm install --no-frozen-lockfile
|
||||
env:
|
||||
NODE_AUTH_TOKEN: ${{ secrets.NPM_GITHUB_AUTH_TOKEN }}
|
||||
|
||||
- name: Install Playwright browsers
|
||||
run: npx playwright install chromium
|
||||
|
||||
# - name: Run E2E tests
|
||||
# run: pnpm run test:e2e
|
||||
# env:
|
||||
# NEXT_PUBLIC_FIREBASE_API_KEY: ${{ secrets.NEXT_PUBLIC_FIREBASE_API_KEY }}
|
||||
# NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN: ${{ secrets.NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN }}
|
||||
# NEXT_PUBLIC_FIREBASE_PROJECT_ID: ${{ secrets.NEXT_PUBLIC_FIREBASE_PROJECT_ID }}
|
||||
# NEXT_PUBLIC_FIREBASE_STORAGE_BUCKET: ${{ secrets.NEXT_PUBLIC_FIREBASE_STORAGE_BUCKET }}
|
||||
# NEXT_PUBLIC_FIREBASE_MESSAGING_SENDER_ID: ${{ secrets.NEXT_PUBLIC_FIREBASE_MESSAGING_SENDER_ID }}
|
||||
# NEXT_PUBLIC_FIREBASE_APP_ID: ${{ secrets.NEXT_PUBLIC_FIREBASE_APP_ID }}
|
||||
# NEXT_PUBLIC_FIREBASE_MEASUREMENT_ID: ${{ secrets.NEXT_PUBLIC_FIREBASE_MEASUREMENT_ID }}
|
||||
|
||||
- name: Run Unit tests
|
||||
run: pnpm run test:unit
|
||||
Reference in New Issue
Block a user