Add a GitHub Action

This commit is contained in:
Charles Marsh 2022-08-10 16:09:27 -04:00
parent 36efdfe7b4
commit 1d1e8491da
1 changed files with 38 additions and 0 deletions

38
.github/workflows/ci.yaml vendored Normal file
View File

@ -0,0 +1,38 @@
name: CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
cargo_build:
name: "cargo build"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
- run: cargo build --bin rust_python_linter --release
cargo_fmt:
name: "cargo fmt"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
- run: cargo fmt --check
cargo_clippy:
name: "cargo clippy"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
- run: cargo clippy -- -D warnings