-
-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
195 changed files
with
21,034 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,113 @@ | ||
name: Tauri2-CI | ||
on: | ||
pull_request: | ||
paths: | ||
- ".github/workflows/tauri2_ci.yaml" | ||
- "frontend/rust-lib/**" | ||
- "frontend/appflowy_web_app/**" | ||
- "frontend/resources/**" | ||
|
||
env: | ||
NODE_VERSION: "18.16.0" | ||
PNPM_VERSION: "8.5.0" | ||
RUST_TOOLCHAIN: "1.75" | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
tauri-build: | ||
if: github.event.pull_request.draft != true | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
platform: [ubuntu-20.04] | ||
|
||
runs-on: ${{ matrix.platform }} | ||
|
||
env: | ||
CI: true | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Maximize build space (ubuntu only) | ||
if: matrix.platform == 'ubuntu-20.04' | ||
run: | | ||
sudo rm -rf /usr/share/dotnet | ||
sudo rm -rf /opt/ghc | ||
sudo rm -rf "/usr/local/share/boost" | ||
sudo rm -rf "$AGENT_TOOLSDIRECTORY" | ||
sudo docker image prune --all --force | ||
sudo rm -rf /opt/hostedtoolcache/codeQL | ||
sudo rm -rf ${GITHUB_WORKSPACE}/.git | ||
sudo rm -rf $ANDROID_HOME/ndk | ||
- name: setup node | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ env.NODE_VERSION }} | ||
|
||
- name: setup pnpm | ||
uses: pnpm/action-setup@v2 | ||
with: | ||
version: ${{ env.PNPM_VERSION }} | ||
|
||
- name: Install Rust toolchain | ||
id: rust_toolchain | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: ${{ env.RUST_TOOLCHAIN }} | ||
override: true | ||
profile: minimal | ||
|
||
- name: Rust cache | ||
uses: swatinem/rust-cache@v2 | ||
with: | ||
workspaces: "./frontend/appflowy_web_app/src-tauri -> target" | ||
|
||
- name: Node_modules cache | ||
uses: actions/cache@v2 | ||
with: | ||
path: frontend/appflowy_web_app/node_modules | ||
key: node-modules-${{ runner.os }} | ||
|
||
- name: install dependencies (windows only) | ||
if: matrix.platform == 'windows-latest' | ||
working-directory: frontend | ||
run: | | ||
cargo install --force duckscript_cli | ||
vcpkg integrate install | ||
- name: install dependencies (ubuntu only) | ||
if: matrix.platform == 'ubuntu-20.04' | ||
working-directory: frontend | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev libappindicator3-dev librsvg2-dev patchelf | ||
- name: install cargo-make | ||
working-directory: frontend | ||
run: | | ||
cargo install --force cargo-make | ||
cargo make appflowy-tauri-deps-tools | ||
- name: install frontend dependencies | ||
working-directory: frontend/appflowy_web_app | ||
run: | | ||
mkdir dist | ||
pnpm install | ||
cd src-tauri && cargo build | ||
- name: test and lint | ||
working-directory: frontend/appflowy_web_app | ||
run: | | ||
pnpm run lint:tauri | ||
- uses: tauri-apps/tauri-action@v0 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tauriScript: pnpm tauri | ||
projectPath: frontend/appflowy_web_app | ||
args: "--debug" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
name: Web2-CI | ||
on: | ||
pull_request: | ||
paths: | ||
- ".github/workflows/web2_ci.yaml" | ||
- "frontend/appflowy_web_app/**" | ||
- "frontend/resources/**" | ||
env: | ||
NODE_VERSION: "18.16.0" | ||
PNPM_VERSION: "8.5.0" | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | ||
cancel-in-progress: true | ||
jobs: | ||
web-build: | ||
if: github.event.pull_request.draft != true | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
platform: [ ubuntu-latest ] | ||
|
||
runs-on: ${{ matrix.platform }} | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Maximize build space (ubuntu only) | ||
if: matrix.platform == 'ubuntu-latest' | ||
run: | | ||
sudo rm -rf /usr/share/dotnet | ||
sudo rm -rf /opt/ghc | ||
sudo rm -rf "/usr/local/share/boost" | ||
sudo rm -rf "$AGENT_TOOLSDIRECTORY" | ||
sudo docker image prune --all --force | ||
sudo rm -rf /opt/hostedtoolcache/codeQL | ||
sudo rm -rf ${GITHUB_WORKSPACE}/.git | ||
sudo rm -rf $ANDROID_HOME/ndk | ||
- name: setup node | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ env.NODE_VERSION }} | ||
- name: setup pnpm | ||
uses: pnpm/action-setup@v2 | ||
with: | ||
version: ${{ env.PNPM_VERSION }} | ||
- name: Node_modules cache | ||
uses: actions/cache@v2 | ||
with: | ||
path: frontend/appflowy_web_app/node_modules | ||
key: node-modules-${{ runner.os }} | ||
- name: install frontend dependencies | ||
working-directory: frontend/appflowy_web_app | ||
run: | | ||
pnpm install | ||
- name: test and lint | ||
working-directory: frontend/appflowy_web_app | ||
run: | | ||
pnpm run lint | ||
- name: build | ||
working-directory: frontend/appflowy_web_app | ||
run: | | ||
pnpm run build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -40,3 +40,5 @@ frontend/package | |
frontend/*.deb | ||
|
||
**/Cargo.toml.bak | ||
|
||
**/.cargo/** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
node_modules/ | ||
dist/ | ||
src-tauri/ | ||
.eslintrc.cjs | ||
tsconfig.json | ||
**/backend/** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
node_modules/ | ||
dist/ | ||
src-tauri/ | ||
.eslintrc.cjs | ||
tsconfig.json | ||
src/application/services/tauri-services/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
module.exports = { | ||
// https://eslint.org/docs/latest/use/configure/configuration-files | ||
env: { | ||
browser: true, | ||
es6: true, | ||
node: true, | ||
}, | ||
extends: ['eslint:recommended', 'plugin:@typescript-eslint/recommended'], | ||
parser: '@typescript-eslint/parser', | ||
parserOptions: { | ||
project: 'tsconfig.json', | ||
sourceType: 'module', | ||
tsconfigRootDir: __dirname, | ||
extraFileExtensions: ['.json'], | ||
}, | ||
plugins: ['@typescript-eslint', 'react-hooks'], | ||
rules: { | ||
'react-hooks/rules-of-hooks': 'error', | ||
'react-hooks/exhaustive-deps': 'error', | ||
'@typescript-eslint/adjacent-overload-signatures': 'error', | ||
'@typescript-eslint/no-empty-function': 'error', | ||
'@typescript-eslint/no-empty-interface': 'error', | ||
'@typescript-eslint/no-floating-promises': 'error', | ||
'@typescript-eslint/await-thenable': 'error', | ||
'@typescript-eslint/no-namespace': 'error', | ||
'@typescript-eslint/no-unnecessary-type-assertion': 'error', | ||
'@typescript-eslint/no-redeclare': 'error', | ||
'@typescript-eslint/prefer-for-of': 'error', | ||
'@typescript-eslint/triple-slash-reference': 'error', | ||
'@typescript-eslint/unified-signatures': 'error', | ||
'no-shadow': 'off', | ||
'@typescript-eslint/no-shadow': 'off', | ||
'constructor-super': 'error', | ||
eqeqeq: ['error', 'always'], | ||
'no-cond-assign': 'error', | ||
'no-duplicate-case': 'error', | ||
'no-duplicate-imports': 'error', | ||
'no-empty': [ | ||
'error', | ||
{ | ||
allowEmptyCatch: true, | ||
}, | ||
], | ||
'no-invalid-this': 'error', | ||
'no-new-wrappers': 'error', | ||
'no-param-reassign': 'error', | ||
'no-sequences': 'error', | ||
'no-throw-literal': 'error', | ||
'no-unsafe-finally': 'error', | ||
'no-unused-labels': 'error', | ||
'no-var': 'error', | ||
'no-void': 'off', | ||
'prefer-const': 'error', | ||
'prefer-spread': 'off', | ||
'@typescript-eslint/no-unused-vars': [ | ||
'error', | ||
{ | ||
argsIgnorePattern: '^_', | ||
}, | ||
], | ||
'padding-line-between-statements': [ | ||
'error', | ||
{ blankLine: 'always', prev: ['const', 'let', 'var'], next: '*' }, | ||
{ blankLine: 'any', prev: ['const', 'let', 'var'], next: ['const', 'let', 'var'] }, | ||
{ blankLine: 'always', prev: 'import', next: '*' }, | ||
{ blankLine: 'any', prev: 'import', next: 'import' }, | ||
{ blankLine: 'always', prev: 'block-like', next: '*' }, | ||
{ blankLine: 'always', prev: 'block', next: '*' }, | ||
|
||
], | ||
}, | ||
ignorePatterns: ['src/**/*.test.ts', '**/__tests__/**/*.json', 'package.json'], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# Logs | ||
logs | ||
*.log | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
pnpm-debug.log* | ||
lerna-debug.log* | ||
|
||
node_modules | ||
dist/** | ||
dist-ssr | ||
*.local | ||
|
||
# Editor directories and files | ||
.vscode/* | ||
!.vscode/extensions.json | ||
.idea | ||
.DS_Store | ||
*.suo | ||
*.ntvs* | ||
*.njsproj | ||
*.sln | ||
*.sw? | ||
|
||
src/@types/translations/*.json | ||
|
||
|
||
src/application/services/tauri-services/backend/models/ | ||
src/application/services/tauri-services/backend/events/ | ||
|
||
.env |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
module.exports = { | ||
arrowParens: 'always', | ||
bracketSpacing: true, | ||
endOfLine: 'lf', | ||
htmlWhitespaceSensitivity: 'css', | ||
insertPragma: false, | ||
jsxBracketSameLine: false, | ||
jsxSingleQuote: true, | ||
printWidth: 121, | ||
plugins: [require('prettier-plugin-tailwindcss')], | ||
proseWrap: 'preserve', | ||
quoteProps: 'as-needed', | ||
requirePragma: false, | ||
semi: true, | ||
singleQuote: true, | ||
tabWidth: 2, | ||
trailingComma: 'es5', | ||
useTabs: false, | ||
vueIndentScriptAndStyle: false, | ||
}; |
Oops, something went wrong.