2022-02-09 12:56:29 +00:00
|
|
|
name: RustUnitTest
|
2022-02-09 12:46:39 +00:00
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches: [ main ]
|
|
|
|
pull_request:
|
|
|
|
branches: [ main ]
|
|
|
|
|
|
|
|
env:
|
|
|
|
CARGO_TERM_COLOR: always
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
tests:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Install Rust
|
|
|
|
run: |
|
|
|
|
curl \
|
|
|
|
--proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
|
|
|
|
source $HOME/.cargo/env
|
|
|
|
rustup toolchain install stable
|
|
|
|
rustup default stable
|
|
|
|
- name: Install protobuf tool
|
2022-02-09 12:56:29 +00:00
|
|
|
run:
|
2022-02-09 12:46:39 +00:00
|
|
|
cargo install --force cargo-make
|
|
|
|
cargo make flowy_dev
|
|
|
|
echo PATH="$PATH":"$HOME/.pub-cache/bin" >> $GITHUB_PATH
|
|
|
|
working-directory: frontend
|
|
|
|
- name: Frontend tests
|
|
|
|
run: cargo test
|
2022-02-09 12:56:29 +00:00
|
|
|
working-directory: frontend/rust-lib
|
2022-02-09 12:46:39 +00:00
|
|
|
- name: Shared-lib tests
|
|
|
|
run: cargo test
|
2022-02-09 12:56:29 +00:00
|
|
|
working-directory: shared-lib
|