From 77805558f6cfcd0f258277ca6513be7bc1b78382 Mon Sep 17 00:00:00 2001 From: Juan Girini Date: Wed, 5 Feb 2025 18:21:10 +0100 Subject: [PATCH] ops: add workflows --- .github/workflows/rust.yml | 44 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 .github/workflows/rust.yml diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml new file mode 100644 index 0000000..63e9489 --- /dev/null +++ b/.github/workflows/rust.yml @@ -0,0 +1,44 @@ +name: Rust + +on: + push: + branches: + - main + pull_request: + branches: + - main + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Install Rust stable + uses: actions-rs/toolchain@v1 + with: + toolchain: stable + override: true + + - name: Install Rust nightly + uses: actions-rs/toolchain@v1 + with: + toolchain: nightly + override: false + + - name: Install dependencies + run: cargo fetch + + - name: Build + run: cargo build --verbose + + - name: Run cargo fmt + run: cargo +nightly fmt -- --check + + - name: Run cargo clippy + run: cargo clippy -- -D warnings + + - name: Run cargo test + run: cargo test --verbose \ No newline at end of file