From 515ddc313016821b7253eeedc23562e88657c3d9 Mon Sep 17 00:00:00 2001 From: Antoine Martin Date: Tue, 30 Mar 2021 00:17:29 +0200 Subject: [PATCH 1/2] ci: setup github workflow --- .github/workflows/ci.yaml | 69 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 .github/workflows/ci.yaml diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml new file mode 100644 index 0000000..0753cdc --- /dev/null +++ b/.github/workflows/ci.yaml @@ -0,0 +1,69 @@ +on: [push, pull_request] + +name: CI + +jobs: + check: + name: Check + runs-on: ubuntu-latest + steps: + - name: Checkout sources + uses: actions/checkout@v2 + + - name: Install nightly toolchain + uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: nightly + override: true + + - name: Run cargo check + uses: actions-rs/cargo@v1 + with: + command: check + + test: + name: Test Suite + runs-on: ubuntu-latest + steps: + - name: Checkout sources + uses: actions/checkout@v2 + + - name: Install nightly toolchain + uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: nightly + override: true + + - name: Run cargo test + uses: actions-rs/cargo@v1 + with: + command: test + + lints: + name: Lints + runs-on: ubuntu-latest + steps: + - name: Checkout sources + uses: actions/checkout@v2 + + - name: Install nightly toolchain + uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: nightly + override: true + components: rustfmt, clippy + + - name: Run cargo fmt + uses: actions-rs/cargo@v1 + with: + command: fmt + args: --all -- --check + + - name: Run cargo clippy + uses: actions-rs/cargo@v1 + with: + command: clippy + args: -- -D warnings From 9c5453bd9c0c500cfdb78c8f969e04ad89e99da1 Mon Sep 17 00:00:00 2001 From: Antoine Martin Date: Tue, 30 Mar 2021 00:23:09 +0200 Subject: [PATCH 2/2] ci: use clippy annotations --- .github/workflows/ci.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 0753cdc..a88c608 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -63,7 +63,7 @@ jobs: args: --all -- --check - name: Run cargo clippy - uses: actions-rs/cargo@v1 + uses: actions-rs/clippy-check@v1 with: - command: clippy - args: -- -D warnings + token: ${{ secrets.GITHUB_TOKEN }} + args: --all-features