mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2024-08-30 18:12:39 +00:00
c1006c18c3
* feat: implement folder indexer * feat: sqlite search views using fts5 * feat: add view indexing to user manager * feat: implement folder indexer * feat: add sqlite search documents * feat: add document indexing to user manager * feat: add document indexing to folder indexer * chore: update collab rev * feat: search frontend integration * refactor: search index * test: add event test * chore: fix ci * feat: initial command palette overlay impl (#4619) * chore: test search engine * chore: initial structure * chore: replace old search request * chore: enable log for lib-dispatch * chore: move search manager to core * feat: move traits and responsibility to search crate * feat: move search to search crate * feat: replace sqlite with tantivy * feat: deserialize tantivy documents * chore: fixes after rebase * chore: clean code * feat: fetch and sort results * fix: code review + cleaning * feat: support custom icons * feat: support view layout icons * feat: rename bloc and fix indexing * fix: prettify dialog * feat: score results * chore: update collab rev * feat: add recent view history to command palette * test: add integration_tests * fix: clippy changes * fix: focus traversal in cmd palette * fix: remove file after merging main * chore: code review and panic-safe * feat: index all views if index does not exist * chore: improve logic with conditional * chore: add is_empty check * chore: abstract logic from folder manager init * chore: update collab rev * chore: code review * chore: fixes after merge + update lock file * chore: revert cargo lock * fix: set icon type when removing icon * fix: code review + dependency inversion * fix: remove icon fix for not persisting icon type * test: simple tests manipulating views * test: create 100 views * fix: tauri build * chore: create 1000 views * chore: create util methods * chore: test * chore: test * chore: remove logs * chore: fix build.rs * chore: export models * chore: enable clear cache on Rust-CI * fix: navigate to newly created views * fix: force disable setting workspace listener on rebuilds * fix: remove late final * fix: missing returns * fix: localization and minor fixes * test: add index assert to large test * fix: missing section param after merging main * chore: try fix unzip file error * chore: lower the test * feat: show hint when result is in trash --------- Co-authored-by: nathan <nathan@appflowy.io> Co-authored-by: Jiraffe7 <twajxjiraffe@gmail.com> Co-authored-by: Lucas.Xu <lucas.xu@appflowy.io>
110 lines
2.9 KiB
YAML
110 lines
2.9 KiB
YAML
name: Rust-CI
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- "main"
|
|
- "develop"
|
|
- "release/*"
|
|
paths:
|
|
- "frontend/rust-lib/**"
|
|
|
|
pull_request:
|
|
branches:
|
|
- "main"
|
|
- "develop"
|
|
- "release/*"
|
|
paths:
|
|
- "frontend/rust-lib/**"
|
|
|
|
env:
|
|
CARGO_TERM_COLOR: always
|
|
RUST_TOOLCHAIN: "1.75"
|
|
|
|
jobs:
|
|
test-on-ubuntu:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Maximize build space
|
|
uses: easimon/maximize-build-space@master
|
|
with:
|
|
root-reserve-mb: 2048
|
|
swap-size-mb: 1024
|
|
remove-dotnet: 'true'
|
|
|
|
# the following step is required to avoid running out of space
|
|
- name: Maximize build space
|
|
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
|
|
|
|
- name: Checkout source code
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Install Rust toolchain
|
|
id: rust_toolchain
|
|
uses: actions-rs/toolchain@v1
|
|
with:
|
|
toolchain: ${{ env.RUST_TOOLCHAIN }}
|
|
override: true
|
|
components: rustfmt, clippy
|
|
profile: minimal
|
|
|
|
- name: Install prerequisites
|
|
working-directory: frontend
|
|
run: |
|
|
cargo install --force cargo-make
|
|
cargo install --force duckscript_cli
|
|
|
|
- uses: Swatinem/rust-cache@v2
|
|
with:
|
|
prefix-key: "ubuntu-latest"
|
|
workspaces: |
|
|
frontend/rust-lib
|
|
|
|
- name: Checkout appflowy cloud code
|
|
uses: actions/checkout@v4
|
|
with:
|
|
repository: AppFlowy-IO/AppFlowy-Cloud
|
|
path: AppFlowy-Cloud
|
|
|
|
- name: Prepare appflowy cloud env
|
|
working-directory: AppFlowy-Cloud
|
|
run: |
|
|
# log level
|
|
cp deploy.env .env
|
|
sed -i 's|RUST_LOG=.*|RUST_LOG=trace|' .env
|
|
sed -i 's|API_EXTERNAL_URL=.*|API_EXTERNAL_URL=http://localhost|' .env
|
|
|
|
- name: Run Docker-Compose
|
|
working-directory: AppFlowy-Cloud
|
|
run: |
|
|
docker pull appflowyinc/appflowy_cloud:latest
|
|
docker compose up -d
|
|
|
|
- name: Run rust-lib tests
|
|
working-directory: frontend/rust-lib
|
|
env:
|
|
RUST_LOG: info
|
|
RUST_BACKTRACE: 1
|
|
af_cloud_test_base_url: http://localhost
|
|
af_cloud_test_ws_url: ws://localhost/ws/v1
|
|
af_cloud_test_gotrue_url: http://localhost/gotrue
|
|
run: cargo test --no-default-features --features="rev-sqlite,dart" -- --nocapture
|
|
|
|
- name: rustfmt rust-lib
|
|
run: cargo fmt --all -- --check
|
|
working-directory: frontend/rust-lib/
|
|
|
|
- name: clippy rust-lib
|
|
run: cargo clippy --all-targets -- -D warnings
|
|
working-directory: frontend/rust-lib
|
|
|
|
- name: Clean up Docker images
|
|
run: |
|
|
docker image prune -af
|
|
docker volume prune -f
|