mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2024-08-30 18:12:39 +00:00
649b0a135a
* feat: implement encrypt and decrypt * feat: encrypt and decrypt * feat: update user profile with encrypt * chore: store encryption sign * fix: login in setting menu * chore: show encryption account name * chore: fix test * ci: fix warnings * test: enable supabase test * chore: fix test and rename column * fix: update user profile after set the secret * fix: encryption with wrong secret * fix: don't save user data if the return value of did_sign_up is err * chore: encrypt snapshot data * chore: refactor snapshots interface * ci: add tests * chore: update collab rev
81 lines
2.2 KiB
YAML
81 lines
2.2 KiB
YAML
name: Rust-CI
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- "main"
|
|
- "develop"
|
|
- "release/*"
|
|
paths:
|
|
- "frontend/rust-lib/**"
|
|
- "shared-lib/**"
|
|
|
|
pull_request:
|
|
branches:
|
|
- "main"
|
|
- "develop"
|
|
- "release/*"
|
|
paths:
|
|
- "frontend/rust-lib/**"
|
|
- "shared-lib/**"
|
|
|
|
env:
|
|
CARGO_TERM_COLOR: always
|
|
RUST_TOOLCHAIN: "1.70"
|
|
|
|
jobs:
|
|
test-on-ubuntu:
|
|
environment: SUPABASE_CI
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout source code
|
|
uses: actions/checkout@v2
|
|
|
|
- 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: Create .env file in flowy-server
|
|
working-directory: frontend/rust-lib/flowy-server
|
|
run: |
|
|
touch .env.ci
|
|
echo SUPABASE_URL=${{ secrets.SUPABASE_URL }} >> .env.ci
|
|
echo SUPABASE_ANON_KEY=${{ secrets.SUPABASE_ANON_KEY }} >> .env.ci
|
|
echo SUPABASE_JWT_SECRET=${{ secrets.SUPABASE_JWT_SECRET }} >> .env.ci
|
|
|
|
- name: Create .env file in flowy-test
|
|
working-directory: frontend/rust-lib/flowy-test
|
|
run: |
|
|
touch .env.ci
|
|
echo SUPABASE_URL=${{ secrets.SUPABASE_URL }} >> .env.ci
|
|
echo SUPABASE_ANON_KEY=${{ secrets.SUPABASE_ANON_KEY }} >> .env.ci
|
|
echo SUPABASE_JWT_SECRET=${{ secrets.SUPABASE_JWT_SECRET }} >> .env.ci
|
|
|
|
- name: Run rust-lib tests
|
|
working-directory: frontend/rust-lib
|
|
run: RUST_LOG=info RUST_BACKTRACE=1 cargo test --no-default-features --features="rev-sqlite"
|
|
|
|
- name: rustfmt rust-lib
|
|
run: cargo fmt --all -- --check
|
|
working-directory: frontend/rust-lib/
|
|
|
|
- name: clippy rust-lib
|
|
run: cargo clippy --all
|
|
working-directory: frontend/rust-lib |