Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(ci): Automatically test new packages by using --workspace #12342

Merged
merged 3 commits into from
Jul 11, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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://github.com/raw/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
Loading