From a81877f1c2b41a83d6bd6180126d59f3e12b6bb7 Mon Sep 17 00:00:00 2001 From: Truman Kilen Date: Sat, 12 Aug 2023 19:59:03 -0500 Subject: [PATCH] Add clippy and rustfmt check workflow --- .github/workflows/check.yml | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 .github/workflows/check.yml diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml new file mode 100644 index 00000000..a433324e --- /dev/null +++ b/.github/workflows/check.yml @@ -0,0 +1,29 @@ +on: [push, pull_request] +name: Run checks + +env: + RUSTFLAGS: "-Dwarnings" + +jobs: + check: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Install packages + run: sudo apt-get update && sudo apt-get install libgtk-3-dev gcc-mingw-w64 + + - uses: actions-rs/toolchain@v1 + with: + toolchain: nightly + components: clippy, rustfmt + target: x86_64-pc-windows-gnu + override: true + + - uses: actions-rs/clippy-check@v1 + name: Check clippy + with: + token: ${{ secrets.GITHUB_TOKEN }} + args: --all-features --all-targets -- -D warnings + + - name: Check rustfmt + run: cargo fmt -- --check