2022-02-09 12:56:29 +00:00
|
|
|
name: RustUnitTest
|
2022-02-09 12:46:39 +00:00
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches: [ main ]
|
2022-02-09 13:13:51 +00:00
|
|
|
# paths:
|
|
|
|
# - 'frontend/rust-lib'
|
|
|
|
# - 'shared-lib'
|
2022-02-09 12:46:39 +00:00
|
|
|
pull_request:
|
|
|
|
branches: [ main ]
|
2022-02-09 13:13:51 +00:00
|
|
|
# paths:
|
|
|
|
# - 'frontend/rust-lib'
|
|
|
|
# - 'shared-lib'
|
2022-02-09 12:46:39 +00:00
|
|
|
|
|
|
|
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
|
2022-02-09 13:13:51 +00:00
|
|
|
- name: Install cargo-make
|
|
|
|
run: cargo install --force cargo-make
|
|
|
|
working-directory: frontend
|
2022-02-09 12:46:39 +00:00
|
|
|
- name: Install protobuf tool
|
2022-02-09 13:56:46 +00:00
|
|
|
run: brew install protobuf
|
2022-02-09 12:46:39 +00:00
|
|
|
working-directory: frontend
|
2022-02-09 13:13:51 +00:00
|
|
|
- name: RustLib tests
|
2022-02-09 13:39:12 +00:00
|
|
|
run: cargo test --no-default-features
|
2022-02-09 12:56:29 +00:00
|
|
|
working-directory: frontend/rust-lib
|
2022-02-09 13:13:51 +00:00
|
|
|
- name: Sharedlib tests
|
2022-02-09 13:39:12 +00:00
|
|
|
run: cargo test --no-default-features
|
2022-02-09 12:56:29 +00:00
|
|
|
working-directory: shared-lib
|