Skip to content

Commit

Permalink
https://github.com/rust-lang/cargo/issues/10476#issuecomment-1066209716
Browse files Browse the repository at this point in the history
  • Loading branch information
matklad committed Mar 15, 2022
1 parent 11ab785 commit 51f28a6
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 22 deletions.
34 changes: 17 additions & 17 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,21 +32,21 @@ jobs:
override: true
- run: cargo run --example ci

publish:
needs: test
name: publish
runs-on: [ubuntu-latest]
# publish:
# needs: test
# name: publish
# runs-on: [ubuntu-latest]

steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: actions-rs/toolchain@v1
with:
toolchain: 1.59.0
profile: minimal
components: rustfmt
override: true
- run: cargo run --example ci -- publish
env:
CRATES_IO_TOKEN: ${{ secrets.CRATES_IO_TOKEN }}
# steps:
# - uses: actions/checkout@v2
# with:
# fetch-depth: 0
# - uses: actions-rs/toolchain@v1
# with:
# toolchain: 1.59.0
# profile: minimal
# components: rustfmt
# override: true
# - run: cargo run --example ci -- publish
# env:
# CRATES_IO_TOKEN: ${{ secrets.CRATES_IO_TOKEN }}
10 changes: 5 additions & 5 deletions examples/ci.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,18 @@ fn try_main() -> Result<()> {
fn test(sh: &Shell) -> Result<()> {
// Can't delete oneself on Windows.
if !cfg!(windows) {
sh.remove_path("./target")?;
// sh.remove_path("./target")?;
}

{
let _s = Section::new("BUILD");
cmd!(sh, "cargo test --workspace --no-run").run()?;
}

{
let _s = Section::new("TEST");
cmd!(sh, "cargo test --workspace").run()?;
}
// {
// let _s = Section::new("TEST");
// cmd!(sh, "cargo test --workspace").run()?;
// }
Ok(())
}

Expand Down

0 comments on commit 51f28a6

Please sign in to comment.