From 1d1e8491dafca64b188afd9c88ee77d585bb4ddb Mon Sep 17 00:00:00 2001 From: Charles Marsh Date: Wed, 10 Aug 2022 16:09:27 -0400 Subject: [PATCH] Add a GitHub Action --- .github/workflows/ci.yaml | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 .github/workflows/ci.yaml diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml new file mode 100644 index 0000000000..330e08fba7 --- /dev/null +++ b/.github/workflows/ci.yaml @@ -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