From cf1898599ab5c1f21039919c4e95f8ff117a2a16 Mon Sep 17 00:00:00 2001 From: Jeremiah Senkpiel Date: Thu, 5 Nov 2020 10:23:58 -0800 Subject: [PATCH 1/2] ci: improvements - run on "main" branch - really check everything - clippy everything including benches - avoid unneccessary actions-rs --- .github/workflows/ci.yaml | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index f21dcee02..5d3933524 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -4,7 +4,9 @@ on: pull_request: push: branches: - - master + - main + - staging + - trying env: RUSTFLAGS: -Dwarnings @@ -31,7 +33,7 @@ jobs: uses: actions-rs/cargo@v1 with: command: check - args: --all --bins --examples + args: --workspace --bins --examples --tests - name: check avoid-dev-deps uses: actions-rs/cargo@v1 @@ -44,13 +46,13 @@ jobs: uses: actions-rs/cargo@v1 with: command: check - args: --all --bins --examples --tests --features unstable + args: --workspace --bins --examples --tests --features unstable - name: check no-default-features uses: actions-rs/cargo@v1 with: command: check - args: --no-default-features + args: --no-default-features --workspace --bins --examples --tests - name: check benches uses: actions-rs/cargo@v1 @@ -62,35 +64,33 @@ jobs: uses: actions-rs/cargo@v1 with: command: test - args: --all + args: --workspace - name: tests unstable uses: actions-rs/cargo@v1 with: command: test - args: --all --features unstable + args: --workspace --features unstable - check_fmt_and_docs: + check_fmt_clippy_docs: name: Checking fmt, clippy, and docs runs-on: ubuntu-latest steps: - uses: actions/checkout@master - - uses: actions-rs/toolchain@v1 - with: - toolchain: nightly - override: true - - - name: setup + - name: nightly setup run: | - rustup component add clippy rustfmt - rustc --version + rustup toolchain install nightly + rustup default nightly - name: clippy - run: cargo clippy --tests --examples -- -D warnings + run: cargo clippy --workspace --bins --examples --tests -- -D warnings + + - name: clippy benches + run: cargo clippy --workspace --benches --features __internal__bench -- -D warnings - name: fmt run: cargo fmt --all -- --check - name: Docs - run: cargo doc --no-deps --features unstable + run: cargo doc --no-deps From 2f3dec9d27544ef63cdde4e9ac52a8f91fc34ce5 Mon Sep 17 00:00:00 2001 From: Jeremiah Senkpiel Date: Mon, 9 Nov 2020 17:10:59 -0800 Subject: [PATCH 2/2] ci: run fmt-clippy-docs on stable Avoids components sometimes not being available on nightly, and has less complexity than running beta. --- .github/workflows/ci.yaml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 5d3933524..6b95b30ab 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -78,11 +78,6 @@ jobs: steps: - uses: actions/checkout@master - - name: nightly setup - run: | - rustup toolchain install nightly - rustup default nightly - - name: clippy run: cargo clippy --workspace --bins --examples --tests -- -D warnings