From 1ac8c09a82926d56b2c9a0f6c1036efdd0f01f62 Mon Sep 17 00:00:00 2001 From: Bert Peters Date: Sun, 16 May 2021 15:00:07 +0200 Subject: [PATCH] Add Github Actions for CI --- .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..b113bb5 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,44 @@ +on: + push: + pull_request: + +name: Continuous integration + +jobs: + ci: + name: Rust project + runs-on: ubuntu-latest + strategy: + matrix: + rust: + - stable + - beta + - nightly + + steps: + - uses: actions/checkout@v2 + + - uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: ${{ matrix.rust }} + override: true + components: rustfmt, clippy + + - uses: actions-rs/cargo@v1 + with: + command: build + + - uses: actions-rs/cargo@v1 + with: + command: test + + - uses: actions-rs/cargo@v1 + with: + command: fmt + args: --all -- --check + + - uses: actions-rs/cargo@v1 + with: + command: clippy + args: -- -D warnings