From ef00ba34f2b8fbfa33ba268d2c652c275757017b Mon Sep 17 00:00:00 2001 From: valkyrie_pilot Date: Sun, 12 Mar 2023 18:36:36 -0600 Subject: [PATCH] add simple checking action --- .github/workflows/pr.yml | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 .github/workflows/pr.yml diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml new file mode 100644 index 0000000..4454203 --- /dev/null +++ b/.github/workflows/pr.yml @@ -0,0 +1,32 @@ +name: Check code +on: + push: + pull_request: + workflow_dispatch: + +jobs: + build: + strategy: + fail-fast: true + matrix: + os: [ubuntu-latest, windows-latest, macos-latest] + runs-on: ${{ matrix.os }} + steps: + - name: Check out code into the proper directory + uses: actions/checkout@v3 + with: + submodules: 'recursive' + + - name: Cache rust + uses: Swatinem/rust-cache@v2 + + - name: Install rust + uses: dtolnay/rust-toolchain@stable + with: + components: rustfmt, clippy + + - name: Check formatting + run: cargo fmt --check + + - name: Check clippy lints + run: cargo clippy