From fce433553fa7542b1478e40097dfa3f07ea2207f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cyryl=20P=C5=82otnicki?= Date: Mon, 23 Sep 2019 13:00:10 +0100 Subject: [PATCH] Use actions-rs --- .github/workflows/test.yml | 62 +++++++++++++++++++++++++++++++++----- 1 file changed, 55 insertions(+), 7 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index f17faeb..2090f07 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,12 +1,60 @@ -name: Test -on: [push] +on: [push, pull_request] + +name: Continuous integration jobs: - build: - name: test + check: + name: Check runs-on: ubuntu-latest steps: - - uses: actions/checkout@master - - uses: cyplo/rust-action@master + - uses: actions/checkout@v1 + - uses: actions-rs/toolchain@v1 with: - args: "cargo fmt -- --check && cargo clippy -- -Dwarnings && cargo test" + toolchain: stable + override: true + - uses: actions-rs/cargo@v1 + with: + command: check + + test: + name: Test Suite + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + - uses: actions-rs/toolchain@v1 + with: + toolchain: stable + override: true + - uses: actions-rs/cargo@v1 + with: + command: test + + fmt: + name: Rustfmt + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + - uses: actions-rs/toolchain@v1 + with: + toolchain: stable + override: true + - run: rustup component add rustfmt + - uses: actions-rs/cargo@v1 + with: + command: fmt + args: --all -- --check + + clippy: + name: Clippy + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + - uses: actions-rs/toolchain@v1 + with: + toolchain: stable + override: true + - run: rustup component add clippy + - uses: actions-rs/cargo@v1 + with: + command: clippy + args: -- -D warnings \ No newline at end of file