Skip to content

Commit

Permalink
Auto merge of #12342 - epage:ci, r=weihanglo
Browse files Browse the repository at this point in the history
chore(ci): Automatically test new packages by using `--workspace`

### What does this PR try to resolve?

This is a part of #11987 that was unblocked by #12321 and #11993

### How should we test and review this PR?

Relying on CI to verify this

I'd prefer to move the `cargo test --workspace` step earlier but we run out of disk space if we do (we currently only have 661 MB of headroom of windows-gnu)

See the individual commits for smaller chunks and explanations for why changes were made.
  • Loading branch information
bors committed Jul 11, 2023
2 parents 445838d + 6968d41 commit 9ed4a24
Showing 1 changed file with 39 additions and 45 deletions.
84 changes: 39 additions & 45 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,41 @@ permissions:
contents: read

jobs:
success:
permissions:
contents: none
name: bors build finished
needs:
- build_std
- clippy
- docs
- lockfile
- resolver
- rustfmt
- test
- test_gitoxide
runs-on: ubuntu-latest
if: "success() && github.event_name == 'push' && github.ref == 'refs/heads/auto-cargo'"
steps:
- run: echo ok
failure:
permissions:
contents: none
name: bors build finished
needs:
- build_std
- clippy
- docs
- lockfile
- resolver
- rustfmt
- test
- test_gitoxide
runs-on: ubuntu-latest
if: "!success() && github.event_name == 'push' && github.ref == 'refs/heads/auto-cargo'"
steps:
- run: exit 1

# Check Code style quickly by running `rustfmt` over all code
rustfmt:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -119,6 +154,7 @@ jobs:
- run: cargo test -p cargo
- name: Clear intermediate test output
run: ci/clean-test-output.sh

- name: gitoxide tests (all git-related tests)
run: cargo test -p cargo git
env:
Expand All @@ -127,22 +163,14 @@ jobs:
# running out of disk space.
- name: Clear test output
run: ci/clean-test-output.sh

# This only tests `cargo fix` because fix-proxy-mode is one of the most
# complicated subprocess management in Cargo.
- name: Check operability of rustc invocation with argfile
run: 'cargo test -p cargo --test testsuite -- fix::'
env:
__CARGO_TEST_FORCE_ARGFILE: 1
- run: cargo test -p cargo-test-support
- run: cargo test -p cargo-platform
- run: cargo test -p cargo-util
- run: cargo test -p home
- run: cargo test -p mdman
- run: cargo build -p cargo-credential-1password
- run: cargo build -p cargo-credential-macos-keychain
- run: cargo build -p cargo-credential-wincred
- run: cargo build -p cargo-credential-gnome-secret
if: matrix.os == 'ubuntu-latest'
- run: cargo test --workspace --exclude cargo --exclude benchsuite
- name: Check benchmarks
run: |
# This only tests one benchmark since it can take over 10 minutes to
Expand All @@ -153,6 +181,7 @@ jobs:
# running out of disk space.
- name: Clear benchmark output
run: ci/clean-test-output.sh

- name: Fetch smoke test
run: ci/fetch-smoke-test.sh

Expand Down Expand Up @@ -211,38 +240,3 @@ jobs:
cd target
curl -sSLO https://raw.githubusercontent.com/rust-lang/rust/master/src/tools/linkchecker/linkcheck.sh
sh linkcheck.sh --all --path ../src/doc cargo
success:
permissions:
contents: none
name: bors build finished
needs:
- build_std
- clippy
- docs
- lockfile
- resolver
- rustfmt
- test
- test_gitoxide
runs-on: ubuntu-latest
if: "success() && github.event_name == 'push' && github.ref == 'refs/heads/auto-cargo'"
steps:
- run: echo ok
failure:
permissions:
contents: none
name: bors build finished
needs:
- build_std
- clippy
- docs
- lockfile
- resolver
- rustfmt
- test
- test_gitoxide
runs-on: ubuntu-latest
if: "!success() && github.event_name == 'push' && github.ref == 'refs/heads/auto-cargo'"
steps:
- run: exit 1

0 comments on commit 9ed4a24

Please sign in to comment.