2023-07-06 22:51:18 -07:00
|
|
|
name: Rust Build and Clippy Check
|
|
|
|
|
|
|
|
on:
|
|
|
|
pull_request:
|
|
|
|
branches:
|
2023-07-18 05:08:32 -07:00
|
|
|
- main
|
2023-07-06 22:51:18 -07:00
|
|
|
push:
|
|
|
|
branches:
|
2023-07-18 05:08:32 -07:00
|
|
|
- main
|
2023-07-06 22:51:18 -07:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Checkout code
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
|
|
|
|
- name: Set up Rust
|
|
|
|
uses: actions-rs/toolchain@v1
|
|
|
|
with:
|
2023-07-14 01:17:35 -07:00
|
|
|
toolchain: stable
|
2023-07-06 22:51:18 -07:00
|
|
|
|
2023-07-18 05:08:32 -07:00
|
|
|
- name: Install Clippy
|
|
|
|
run: rustup component add clippy --toolchain stable
|
|
|
|
|
2023-07-06 22:51:18 -07:00
|
|
|
- name: Build and test
|
|
|
|
run: |
|
|
|
|
cargo build --all-targets
|
|
|
|
cargo test --all-targets
|
|
|
|
|
|
|
|
- name: Run Clippy
|
|
|
|
run: cargo clippy --all-targets -- -D warnings
|