Data generation / retrieval for Training #56
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 CI | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
# Checkout the repository | |
- uses: actions/checkout@v4 | |
# Install Rust | |
- name: Set up Rust | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
override: true | |
# Cache dependencies for faster builds | |
- name: Cache Cargo | |
uses: actions/cache@v3 | |
with: | |
path: ~/.cargo/registry | |
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | |
restore-keys: | | |
${{ runner.os }}-cargo- | |
# Build the project | |
- name: Build | |
run: cargo build --verbose | |
# Run tests | |
- name: Run tests | |
run: cargo test --verbose | |
# Run linter (clippy) | |
- name: Run Clippy | |
run: cargo clippy --all-targets --all-features -- -D warnings | |
# Run formatter check | |
- name: Run rustfmt | |
run: cargo fmt -- --check | |