Skip to content

Commit

Permalink
Update CI config and fix CI failure (#101)
Browse files Browse the repository at this point in the history
  • Loading branch information
taiki-e authored Jan 6, 2024
1 parent 3a693e5 commit e40ce2c
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 22 deletions.
26 changes: 10 additions & 16 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,56 +8,50 @@ on:
branches:
- master
schedule:
- cron: '0 2 * * *'
- cron: '0 2 * * 0'

env:
RUSTFLAGS: -Dwarnings
RUST_BACKTRACE: 1
# This is the minimum supported Rust version of this crate.
# When updating this, the reminder to update the minimum supported
# Rust version in README.md, Cargo.toml, and .clippy.toml.
minrust: '1.56'

jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Install Rust
run: rustup update stable
- run: rustup component add rust-src
- run: cargo test --all-features

minrust:
env:
CARGO_NET_GIT_FETCH_WITH_CLI: true
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install Rust
run: rustup update ${{ env.minrust }} && rustup default ${{ env.minrust }}
- run: cargo build --all-features
- uses: actions/checkout@v4
- name: Install cargo-hack
uses: taiki-e/install-action@cargo-hack
- run: cargo hack build --all-features --ignore-private --rust-version

fmt:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Install Rust
run: rustup update stable
- run: cargo fmt --all -- --check
- run: cargo fmt --all --check

clippy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Install Rust
run: rustup update stable
- run: cargo clippy --all-features

docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Install Rust
run: rustup update nightly && rustup default nightly
- run: cargo doc --no-deps --all-features
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
if: github.repository_owner == 'tokio-rs'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: taiki-e/create-gh-release-action@v1
with:
changelog: async-stream/CHANGELOG.md
Expand Down
2 changes: 1 addition & 1 deletion async-stream/tests/ui/yield_in_async.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ error[E0658]: yield syntax is experimental
|
= note: see issue #43122 <https://github.com/rust-lang/rust/issues/43122> for more information

error[E0727]: `async` generators are not yet supported
error[E0727]: `async` coroutines are not yet supported
--> tests/ui/yield_in_async.rs:6:13
|
6 | yield 123;
Expand Down
6 changes: 3 additions & 3 deletions async-stream/tests/ui/yield_in_closure.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ error[E0658]: yield syntax is experimental
|
= note: see issue #43122 <https://github.com/rust-lang/rust/issues/43122> for more information

error[E0277]: expected a `FnOnce<(&str,)>` closure, found `[generator@$DIR/tests/ui/yield_in_closure.rs:6:23: 6:26]`
error[E0277]: expected a `FnOnce(&str)` closure, found `{coroutine@$DIR/tests/ui/yield_in_closure.rs:6:23: 6:26}`
--> tests/ui/yield_in_closure.rs:6:23
|
6 | .and_then(|v| {
Expand All @@ -16,9 +16,9 @@ error[E0277]: expected a `FnOnce<(&str,)>` closure, found `[generator@$DIR/tests
7 | | yield v;
8 | | Ok(())
9 | | });
| |_____________^ expected an `FnOnce<(&str,)>` closure, found `[generator@$DIR/tests/ui/yield_in_closure.rs:6:23: 6:26]`
| |_____________^ expected an `FnOnce(&str)` closure, found `{coroutine@$DIR/tests/ui/yield_in_closure.rs:6:23: 6:26}`
|
= help: the trait `FnOnce<(&str,)>` is not implemented for `[generator@$DIR/tests/ui/yield_in_closure.rs:6:23: 6:26]`
= help: the trait `FnOnce<(&str,)>` is not implemented for `{coroutine@$DIR/tests/ui/yield_in_closure.rs:6:23: 6:26}`
note: required by a bound in `Result::<T, E>::and_then`
--> $RUST/core/src/result.rs
|
Expand Down
2 changes: 1 addition & 1 deletion async-stream/tests/ui/yield_in_nested_fn.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ error[E0658]: yield syntax is experimental
|
= note: see issue #43122 <https://github.com/rust-lang/rust/issues/43122> for more information

error[E0627]: yield expression outside of generator literal
error[E0627]: yield expression outside of coroutine literal
--> tests/ui/yield_in_nested_fn.rs:6:13
|
6 | yield "hello";
Expand Down

0 comments on commit e40ce2c

Please sign in to comment.