mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2024-08-30 18:12:39 +00:00
4708c0f779
* feat: billing client * feat: subscribe workspace default impl * feat: added create subscription * feat: add get workspace subs * feat: added subscription cancellation * feat: add workspace limits api * fix: update client api * feat: user billing portal * feat: billing UI (#5455) * feat: plan ui * feat: billing ui * feat: settings plan comparison dialog * feat: complete plan+billing ui * feat: backend integration * chore: cleaning * chore: fixes after merge * fix: dependency issue * feat: added subscription plan cancellation information * feat: subscription callback + canceled date * feat: put behind feature flag * feat: downgrade/upgrade dialogs * feat: update limit error codes * fix: billing refresh + downgrade dialog * fix: some minor improvements to settings * chore: use patch for client-api in tauri * fix: add shared-entity to patch * fix: compile * ci: try to add back maximize build space step * test: increase timeout in failing test --------- Co-authored-by: Zack Fu Zi Xiang <speed2exe@live.com.sg>
113 lines
3.0 KiB
YAML
113 lines
3.0 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.77.2"
|
|
|
|
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
|
|
env:
|
|
BACKEND_VERSION: 0.3.24-amd64
|
|
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: |
|
|
DISABLE_CI_TEST_LOG="true" cargo test --no-default-features --features="dart"
|
|
|
|
- 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
|