From ed825f012636af06defda42f9c1ed26a250f7b13 Mon Sep 17 00:00:00 2001 From: Robin Krahl Date: Mon, 6 May 2024 13:20:31 +0200 Subject: [PATCH] Add basic CI setup --- .github/workflows/ci.yml | 44 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..260eaf5 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,44 @@ +name: CI + +on: [push, pull_request] + +jobs: + check: + name: Check library + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@master + - uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: stable + override: true + - name: Check library + run: cargo check + + test: + name: Run tests + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@master + - uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: stable + override: true + - name: Run tests + run: cargo test + + fmt: + name: Run rustfmt + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@master + - uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: stable + override: true + components: "rustfmt" + - name: Run rustfmt + run: cargo fmt -- --check