35 lines
601 B
YAML
35 lines
601 B
YAML
name: Rust Build and Clippy Check
|
|
|
|
on:
|
|
pull_request:
|
|
branches:
|
|
- main
|
|
push:
|
|
branches:
|
|
- main
|
|
|
|
jobs:
|
|
build:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Set up Rust
|
|
uses: actions-rs/toolchain@v1
|
|
with:
|
|
toolchain: stable
|
|
|
|
- name: Install Clippy
|
|
run: rustup component add clippy --toolchain stable
|
|
|
|
- name: Build and test
|
|
run: |
|
|
cargo build --all-targets
|
|
cargo test --all-targets
|
|
|
|
- name: Run Clippy
|
|
run: cargo clippy --all-targets -- -D warnings
|