From daaf26d3f278e3c1ba39701929c7e79a56ba48ae Mon Sep 17 00:00:00 2001 From: Olivier FAURE Date: Mon, 11 Apr 2022 19:01:45 +0200 Subject: [PATCH] Add Github actions --- .github/workflows/ci.yml | 50 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 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..10e103d --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,50 @@ +on: + push: + branches: + - master + pull_request: + +jobs: + rustfmt: + runs-on: ubuntu-latest + name: cargo fmt + steps: + - uses: actions/checkout@v2 + + - name: install stable toolchain + uses: actions-rs/toolchain@v1 + with: + toolchain: stable + profile: minimal + components: rustfmt + override: true + + - name: cargo fmt + uses: actions-rs/cargo@v1 + with: + command: fmt + args: --all -- --check + + test-stable: + runs-on: ubuntu-latest + name: cargo clippy+test + steps: + - uses: actions/checkout@v2 + + - name: install stable toolchain + uses: actions-rs/toolchain@v1 + with: + toolchain: stable + components: clippy + profile: minimal + override: true + + - name: cargo clippy + uses: actions-rs/cargo@v1 + with: + command: clippy + + - name: cargo test + uses: actions-rs/cargo@v1 + with: + command: test