refactor: make db and data_path global and tidy up #12
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: "Tests" | |
on: | |
push: | |
branches: ["main"] | |
paths: | |
- "src/**" | |
- "Crate.toml" | |
- "Crate.lock" | |
pull_request: | |
branches: ["main"] | |
types: [ready_for_review, opened, synchronize] | |
paths: | |
- "src/**" | |
- "Cargo.toml" | |
- "Cargo.lock" | |
workflow_dispatch: | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
Rust: | |
name: "Rust" | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
submodules: recursive | |
- name: Setup Rust Toolchain | |
uses: actions-rust-lang/setup-rust-toolchain@v1 | |
with: | |
toolchain: stable | |
components: rustfmt, clippy | |
cache: true | |
- name: Build Project | |
run: cargo build --all | |
- name: Run Tests | |
run: cargo test --all | |
- name: Run Clippy | |
run: cargo clippy --all -- -D warnings | |
- name: Run Rustfmt | |
run: cargo fmt --all --check |