Skip to content

Commit

Permalink
Create rust.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
mat-kie authored Nov 28, 2024
1 parent 00631fd commit 8d3be4e
Showing 1 changed file with 45 additions and 0 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Rust CI/CD

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
build:
name: Build and Test
runs-on: ubuntu-latest

steps:
- name: Checkout Code
uses: actions/checkout@v4

- name: Set up Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
target: x86_64-unknown-linux-gnu
profile: minimal
override: true

- name: Install Dependencies
run: rustup component add clippy rustfmt

- name: Run Clippy (Linting)
run: cargo clippy --all-targets --all-features -- -D warnings

- name: Run Tests
run: cargo test --all-targets --all-features --verbose

- name: Build Project
run: cargo build --release

- name: Upload Build Artifacts
if: always()
uses: actions/upload-artifact@v3
with:
name: hrv-rs-build
path: target/release/

0 comments on commit 8d3be4e

Please sign in to comment.