fix: avoid deadlock in nested shell calls #16507
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: test | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | |
cancel-in-progress: true | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
nextest: | |
uses: ./.github/workflows/nextest.yml | |
with: | |
profile: default | |
docs: | |
runs-on: ubuntu-latest | |
timeout-minutes: 30 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@nightly | |
- uses: Swatinem/rust-cache@v2 | |
with: | |
cache-on-failure: true | |
- name: Build documentation | |
run: cargo doc --workspace --all-features --no-deps --document-private-items | |
env: | |
RUSTDOCFLAGS: --cfg docsrs -D warnings --show-type-layout --generate-link-to-definition --enable-index-page -Zunstable-options | |
- name: Deploy documentation | |
uses: peaceiris/actions-gh-pages@v3 | |
if: github.event_name == 'push' && github.ref == 'refs/heads/master' | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: target/doc | |
force_orphan: true | |
doctest: | |
runs-on: ubuntu-latest | |
timeout-minutes: 30 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@stable | |
- uses: Swatinem/rust-cache@v2 | |
with: | |
cache-on-failure: true | |
- run: cargo test --workspace --doc | |
codespell: | |
runs-on: ubuntu-latest | |
timeout-minutes: 30 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: codespell-project/actions-codespell@v2 | |
with: | |
skip: "*.json" | |
clippy: | |
runs-on: ubuntu-latest | |
timeout-minutes: 30 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@clippy | |
- uses: Swatinem/rust-cache@v2 | |
with: | |
cache-on-failure: true | |
- run: cargo clippy --workspace --all-targets --all-features | |
env: | |
RUSTFLAGS: -Dwarnings | |
rustfmt: | |
runs-on: ubuntu-latest | |
timeout-minutes: 30 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@nightly | |
with: | |
toolchain: nightly-2024-02-03 | |
components: rustfmt | |
- run: cargo fmt --all --check | |
forge-fmt: | |
runs-on: ubuntu-latest | |
timeout-minutes: 30 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@stable | |
- uses: Swatinem/rust-cache@v2 | |
with: | |
cache-on-failure: true | |
- name: forge fmt | |
shell: bash | |
run: ./.github/scripts/format.sh --check | |
crate-checks: | |
runs-on: ubuntu-latest | |
timeout-minutes: 30 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@stable | |
- uses: taiki-e/install-action@cargo-hack | |
- uses: Swatinem/rust-cache@v2 | |
with: | |
cache-on-failure: true | |
- run: cargo hack check | |
ci-success: | |
runs-on: ubuntu-latest | |
if: always() | |
needs: | |
- nextest | |
- docs | |
- doctest | |
- codespell | |
- clippy | |
- rustfmt | |
- forge-fmt | |
- crate-checks | |
timeout-minutes: 30 | |
steps: | |
- name: Decide whether the needed jobs succeeded or failed | |
uses: re-actors/alls-green@release/v1 | |
with: | |
jobs: ${{ toJSON(needs) }} |