Skip to content

Commit

Permalink
adding rust pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
maebli committed Nov 13, 2023
1 parent 5e99c75 commit c2d0b03
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Rust

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Set up Rust
uses: actions-rust-action@v1
with:
rust-version: stable
- name: Build
run: cargo build --verbose
- name: Run tests
run: cargo test --verbose
- name: Lint with Clippy
run: |
rustup component add clippy
cargo clippy -- -D warnings
- name: Check for third-party libraries
run: |
if grep -q 'dependencies' Cargo.toml; then
if grep -v '^\[dependencies\]$' Cargo.toml | grep -q '^\[.*\]$'; then
echo "Third-party libraries found in Cargo.toml"
exit 1
fi
fi

0 comments on commit c2d0b03

Please sign in to comment.