feat: merge new olavm, fix bug of storage #470
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Rust | |
on: [push, pull_request] | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
# fmt: | |
# name: Rustfmt | |
# runs-on: ubuntu-latest | |
# steps: | |
# - uses: actions/checkout@v3 | |
# - name: Install latest nightly | |
# uses: actions-rs/toolchain@v1 | |
# with: | |
# profile: minimal | |
# toolchain: nightly | |
# override: true | |
# components: rustfmt, clippy | |
# - uses: actions-rs/cargo@v1 | |
# with: | |
# command: fmt | |
# args: --all -- --check | |
# clippy: | |
# name: Clippy | |
# runs-on: ubuntu-latest | |
# services: | |
# postgres: | |
# image: postgres | |
# ports: | |
# - 5434:5432 | |
# steps: | |
# - uses: actions/checkout@v2 | |
# - uses: actions-rs/toolchain@v1 | |
# with: | |
# profile: minimal | |
# toolchain: stable | |
# override: true | |
# - run: rustup component add clippy | |
# - name: Migrate database | |
# run: | | |
# sudo apt-get install libpq-dev -y | |
# cargo install --version=0.7.2 sqlx-cli --no-default-features --features postgres | |
# SKIP_DOCKER=true cd dal && ./scripts/init_db.sh | |
# - uses: actions-rs/cargo@v1 | |
# with: | |
# command: clippy | |
# args: -- -D warnings | |
build: | |
runs-on: ubuntu-latest | |
services: | |
postgres: | |
image: postgres | |
ports: | |
- 5434:5432 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install latest nightly | |
uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: nightly-2024-01-19 | |
override: true | |
components: rustfmt, clippy | |
- name: fmt | |
run: cargo fmt --all -- --check | |
- name: Docker prepare | |
run: docker network create olaos-db-sync | |
- name: Migrate database | |
run: | | |
sudo apt-get install libpq-dev -y | |
cargo install --version=0.7.2 sqlx-cli --no-default-features --features postgres | |
SKIP_DOCKER=true cd dal && ./scripts/init_main_db.sh | |
- name: Build | |
run: cargo build | |
- name: Run tests | |
run: cargo test |