From ea166aa313bc7c8bd08bbdd86063dfa4dcc1ebf9 Mon Sep 17 00:00:00 2001 From: Daniel Prilik Date: Sat, 18 Sep 2021 13:32:00 -0700 Subject: [PATCH] streamline and improve CI switches clippy over to stable --- .github/workflows/ci.yml | 49 +++++++++++++++++++++++++++++++++ .github/workflows/lints.yml | 33 ---------------------- .github/workflows/stable-ci.yml | 38 ------------------------- 3 files changed, 49 insertions(+), 71 deletions(-) create mode 100644 .github/workflows/ci.yml delete mode 100644 .github/workflows/lints.yml delete mode 100644 .github/workflows/stable-ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 00000000..3fb45cf1 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,49 @@ +on: [push, pull_request] + +jobs: + test: + name: clippy + tests + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: stable + - name: cargo test + uses: actions-rs/cargo@v1 + with: + command: test + args: --workspace --features=std + - name: cargo clippy + uses: actions-rs/cargo@v1 + with: + command: clippy + args: --workspace --tests --examples --features=std -- -D warnings + # don't forget the no_std example! + - name: cargo clippy (example_no_std) + uses: actions-rs/cargo@v1 + with: + command: clippy + args: --manifest-path example_no_std/Cargo.toml + rustfmt: + name: rustfmt (nightly) + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: nightly + components: rustfmt + - name: cargo +nightly fmt + uses: actions-rs/cargo@v1 + with: + command: fmt + args: --all -- --check + # don't forget the no_std example! + - name: cargo +nightly fmt (example_no_std) + uses: actions-rs/cargo@v1 + with: + command: fmt + args: --manifest-path example_no_std/Cargo.toml diff --git a/.github/workflows/lints.yml b/.github/workflows/lints.yml deleted file mode 100644 index 39133dd8..00000000 --- a/.github/workflows/lints.yml +++ /dev/null @@ -1,33 +0,0 @@ -on: [push, pull_request] - -name: Lints - -jobs: - clippy: - name: Clippy - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: actions-rs/toolchain@v1 - with: - profile: minimal - toolchain: nightly - override: true - components: rustfmt, clippy - - uses: actions-rs/cargo@v1 - with: - command: fmt - args: --all -- --check - - uses: actions-rs/cargo@v1 - with: - command: clippy - args: --all --examples --features=std -- -D warnings - # don't forget the no_std example! - - uses: actions-rs/cargo@v1 - with: - command: fmt - args: --manifest-path example_no_std/Cargo.toml - - uses: actions-rs/cargo@v1 - with: - command: clippy - args: --manifest-path example_no_std/Cargo.toml diff --git a/.github/workflows/stable-ci.yml b/.github/workflows/stable-ci.yml deleted file mode 100644 index ea317c80..00000000 --- a/.github/workflows/stable-ci.yml +++ /dev/null @@ -1,38 +0,0 @@ -on: [push, pull_request] - -name: Continuous integration - -jobs: - check: - name: Check - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: actions-rs/toolchain@v1 - with: - profile: minimal - toolchain: stable - override: true - - uses: actions-rs/cargo@v1 - with: - command: check - args: --all --examples --features=std - # don't forget the no_std example! - - uses: actions-rs/cargo@v1 - with: - command: check - args: --manifest-path example_no_std/Cargo.toml - test: - name: Tests - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: actions-rs/toolchain@v1 - with: - profile: minimal - toolchain: stable - override: true - - uses: actions-rs/cargo@v1 - with: - command: test - args: --all --features=std