Refresh GitHub workflows (#337)

* Add .idea in .gitignore

* Refresh Github workflows

* Allow very complex type usage in ntex-rt
This commit is contained in:
Pavlos-Petros Tournaris 2024-04-07 20:42:16 +03:00 committed by GitHub
parent 0b73ae8fa8
commit a858394855
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 51 additions and 79 deletions

View file

@ -7,16 +7,12 @@ jobs:
name: Clippy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
- uses: actions/checkout@v4
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: stable
components: clippy
override: true
- uses: actions-rs/clippy-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: --all-features
toolchain: stable
components: clippy
- run: cargo clippy --all-features
fmt:
name: Rustfmt
@ -26,13 +22,10 @@ jobs:
rust:
- stable
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
- uses: actions/checkout@v4
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
profile: minimal
toolchain: ${{ matrix.rust }}
override: true
- uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
components: rustfmt
rustflags: --profile minimal
- run: cargo fmt --all -- --check

View file

@ -13,19 +13,15 @@ jobs:
with:
tool-cache: true
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Install Rust
run: rustup update nightly
- name: Install cargo-llvm-cov
uses: taiki-e/install-action@cargo-llvm-cov
- uses: actions-rust-lang/setup-rust-toolchain@v1
- name: Generate Cargo.lock
uses: actions-rs/cargo@v1
with:
command: generate-lockfile
- name: Cache Dependencies
uses: Swatinem/rust-cache@v1.0.1
run: cargo generate-lockfile
- name: Clean coverage results
run: cargo llvm-cov clean --workspace
@ -40,7 +36,7 @@ jobs:
run: cargo +nightly llvm-cov report --lcov --output-path lcov.info --ignore-filename-regex="ntex-tokio|ntex-glommio|ntex-async-std"
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
uses: codecov/codecov-action@v4
with:
files: lcov.info
fail_ci_if_error: true

View file

@ -21,38 +21,32 @@ jobs:
with:
tool-cache: true
- uses: actions/checkout@master
- uses: actions/checkout@v4
- name: Install ${{ matrix.version }}
uses: actions-rs/toolchain@v1
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: ${{ matrix.version }}-x86_64-unknown-linux-gnu
profile: minimal
override: true
- uses: actions-rust-lang/setup-rust-toolchain@v1
- name: Generate Cargo.lock
uses: actions-rs/cargo@v1
with:
command: generate-lockfile
run: cargo generate-lockfile
- name: Cache cargo registry
uses: actions/cache@v1
uses: actions/cache@v4
with:
path: ~/.cargo/registry
key: ${{ matrix.version }}-x86_64-unknown-linux-gnu-cargo-registry-trimmed-${{ hashFiles('**/Cargo.lock') }}
- name: Cache cargo index
uses: actions/cache@v1
uses: actions/cache@v4
with:
path: ~/.cargo/git
key: ${{ matrix.version }}-x86_64-unknown-linux-gnu-cargo-index-trimmed-${{ hashFiles('**/Cargo.lock') }}
- name: Run tests
uses: actions-rs/cargo@v1
timeout-minutes: 40
with:
command: test
args: --all --all-features --no-fail-fast -- --nocapture
run: cargo test --all --all-features --no-fail-fast -- --nocapture
- name: Run async-std tests
timeout-minutes: 40

View file

@ -15,37 +15,30 @@ jobs:
runs-on: macOS-latest
steps:
- uses: actions/checkout@master
- uses: actions/checkout@v4
- name: Install ${{ matrix.version }}
uses: actions-rs/toolchain@v1
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: ${{ matrix.version }}-x86_64-apple-darwin
profile: minimal
override: true
- name: Generate Cargo.lock
uses: actions-rs/cargo@v1
with:
command: generate-lockfile
run: cargo generate-lockfile
- name: Cache cargo registry
uses: actions/cache@v1
uses: actions/cache@v4
with:
path: ~/.cargo/registry
key: ${{ matrix.version }}-x86_64-apple-darwin-cargo-registry-trimmed-${{ hashFiles('**/Cargo.lock') }}
- name: Cache cargo index
uses: actions/cache@v1
uses: actions/cache@v4
with:
path: ~/.cargo/git
key: ${{ matrix.version }}-x86_64-apple-darwin-cargo-index-trimmed-${{ hashFiles('**/Cargo.lock') }}
- name: Run tests
uses: actions-rs/cargo@v1
with:
command: test
args: --all --all-features --no-fail-fast -- --nocapture
run: cargo test --all --all-features --no-fail-fast -- --nocapture
- name: Clear the cargo caches
run: |

View file

@ -18,19 +18,15 @@ jobs:
runs-on: windows-latest
steps:
- uses: actions/checkout@master
- uses: actions/checkout@v4
- name: Install ${{ matrix.version }}
uses: actions-rs/toolchain@v1
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: ${{ matrix.version }}-x86_64-pc-windows-msvc
profile: minimal
override: true
- name: Generate Cargo.lock
uses: actions-rs/cargo@v1
with:
command: generate-lockfile
run: cargo generate-lockfile
- name: Cache vcpkg
uses: actions/cache@v4
@ -66,24 +62,22 @@ jobs:
Get-ChildItem C:\vcpkg\installed\x64-windows\lib
- name: Run tests
uses: actions-rs/cargo@v1
with:
command: test
args: --lib --all-features --no-fail-fast -- --nocapture
--skip test_panic_in_worker
--skip test_connection_force_close
--skip test_connection_server_close
--skip test_freeze
--skip test_simple
--skip test_test_methods
--skip test_connection_wait_queue_force_close
--skip test_params
--skip test_body
--skip test_form
--skip test_json
--skip test_connection_reuse
--skip test_connection_wait_queue
--skip test_no_decompress
--skip test_connection_reuse_h2
--skip test_h2_tcp
--skip test_timer
run: |
cargo test --lib --all-features --no-fail-fast -- --nocapture \
--skip test_panic_in_worker \
--skip test_connection_force_close \
--skip test_connection_server_close \
--skip test_freeze \
--skip test_simple \
--skip test_test_methods \
--skip test_connection_wait_queue_force_close \
--skip test_params \
--skip test_body \
--skip test_form \
--skip test_json \
--skip test_connection_reuse \
--skip test_connection_wait_queue \
--skip test_no_decompress \
--skip test_connection_reuse_h2 \
--skip test_h2_tcp \
--skip test_timer

1
.gitignore vendored
View file

@ -13,3 +13,4 @@ cobertura.xml
# These are backup files generated by rustfmt
**/*.rs.bk
.idea/

View file

@ -140,6 +140,7 @@ mod glommio {
/// Blocking operation completion future. It resolves with results
/// of blocking function execution.
#[allow(clippy::type_complexity)]
pub struct JoinHandle<T> {
fut:
Either<task::JoinHandle<T>, Pin<Box<dyn Future<Output = Result<T, Canceled>>>>>,