From 4ed8861279251c741aa987413f412b0ec4fec4a3 Mon Sep 17 00:00:00 2001 From: Dmitriy Pleshevskiy Date: Sun, 21 Feb 2021 17:15:09 +0300 Subject: [PATCH] ci: configure github actions --- .github/workflows/rust.yml | 52 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 .github/workflows/rust.yml diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml new file mode 100644 index 0000000..af7731c --- /dev/null +++ b/.github/workflows/rust.yml @@ -0,0 +1,52 @@ +name: CI + +on: [push, pull_request] + +env: + CARGO_TERM_COLOR: always + +jobs: + ci: + runs-on: ubuntu-latest + strategy: + matrix: + rust: + - stable + - beta + - nightly + - 1.50.0 # MSRV + steps: + - uses: actions/checkout@v2 + + - name: Toolchain + uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: ${{ matrix.rust }} + override: true + components: rustfmt, clippy + + - name: Build + uses: actions-rs/cargo@v1 + with: + command: build + + - name: Check format + uses: actions-rs/cargo@v1 + with: + command: fmt + args: --all -- --check + + - name: Check clippy + uses: actions-rs/cargo@v1 + with: + command: clippy + args: -- -D warnings + + - uses: isbang/compose-action@v0.1 + + - name: Run tests + uses: actions-rs/cargo@v1 + with: + command: test + args: -- --test-threads=1