Skip to content

Added github actions #1

Added github actions

Added github actions #1

Workflow file for this run

name: Build, Clippy (Pedantic), Test, and Push
on:
push:
branches:
- main
pull_request:
jobs:
build-clippy-test-push:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Rust
uses: actions/setup-rust@v1
with:
rust-version: stable
- name: Build (fail on warnings)
run: cargo build --verbose
env:
RUSTFLAGS: "-D warnings"
- name: Run Clippy (pedantic, fail on warnings)
run: cargo clippy --all-targets --all-features -- -D warnings -W clippy::pedantic
- name: Run tests
run: cargo test --verbose
- name: Push changes
if: ${{ success() && github.ref == 'refs/heads/main' }}
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git push origin main