mirror of
https://github.com/ntex-rs/ntex.git
synced 2025-04-04 13:27:39 +03:00
Cache openssl for Windows action (#11)
* add openssl cache * Fail fast for win * fix timeouts in test
This commit is contained in:
parent
1133545686
commit
8a753a762f
5 changed files with 19 additions and 17 deletions
4
.github/workflows/linux.yml
vendored
4
.github/workflows/linux.yml
vendored
|
@ -55,7 +55,7 @@ jobs:
|
|||
path: ~/.cargo/bin
|
||||
key: ${{ matrix.version }}-x86_64-unknown-linux-gnu-tarpaulin
|
||||
|
||||
- name: tests
|
||||
- name: Run tests
|
||||
uses: actions-rs/cargo@v1
|
||||
timeout-minutes: 40
|
||||
with:
|
||||
|
@ -68,7 +68,7 @@ jobs:
|
|||
run: |
|
||||
cargo install cargo-tarpaulin
|
||||
|
||||
- name: Generate coverage file
|
||||
- name: Generate coverage report
|
||||
if: matrix.version == '1.42.0' && (github.ref == 'refs/heads/master' || github.event_name == 'pull_request')
|
||||
continue-on-error: true
|
||||
run: |
|
||||
|
|
8
.github/workflows/osx.yml
vendored
8
.github/workflows/osx.yml
vendored
|
@ -47,13 +47,7 @@ jobs:
|
|||
path: target
|
||||
key: ${{ matrix.version }}-x86_64-apple-darwin-cargo-build-trimmed-${{ hashFiles('**/Cargo.lock') }}
|
||||
|
||||
- name: check build
|
||||
uses: actions-rs/cargo@v1
|
||||
with:
|
||||
command: check
|
||||
args: --all --all-features --bins --examples --tests
|
||||
|
||||
- name: tests
|
||||
- name: Run tests
|
||||
uses: actions-rs/cargo@v1
|
||||
with:
|
||||
command: test
|
||||
|
|
10
.github/workflows/windows.yml
vendored
10
.github/workflows/windows.yml
vendored
|
@ -27,6 +27,12 @@ jobs:
|
|||
profile: minimal
|
||||
override: true
|
||||
|
||||
- name: Cache vcpkg
|
||||
uses: actions/cache@v1
|
||||
with:
|
||||
path: C:\vcpkg\installed\x64-windows\
|
||||
key: x86_64-pc-windows-msvc-openssl
|
||||
|
||||
- name: Install OpenSSL
|
||||
run: |
|
||||
vcpkg integrate install
|
||||
|
@ -36,8 +42,8 @@ jobs:
|
|||
Get-ChildItem C:\vcpkg\installed\x64-windows\bin
|
||||
Get-ChildItem C:\vcpkg\installed\x64-windows\lib
|
||||
|
||||
- name: tests
|
||||
- name: Run tests
|
||||
uses: actions-rs/cargo@v1
|
||||
with:
|
||||
command: test
|
||||
args: --all --all-features --no-fail-fast -- --nocapture
|
||||
args: --all --all-features -- --nocapture
|
||||
|
|
|
@ -376,7 +376,7 @@ async fn test_with_query_parameter() {
|
|||
}))
|
||||
});
|
||||
|
||||
let res = Client::new().get(srv.url("/?qp=5")).send().await.unwrap();
|
||||
let res = srv.get("/?qp=5").send().await.unwrap();
|
||||
assert!(res.status().is_success());
|
||||
}
|
||||
|
||||
|
@ -392,7 +392,9 @@ async fn test_no_decompress() {
|
|||
})))
|
||||
});
|
||||
|
||||
let mut res = Client::new()
|
||||
let client = Client::build().timeout(Duration::from_secs(30)).finish();
|
||||
|
||||
let mut res = client
|
||||
.get(srv.url("/"))
|
||||
.no_decompress()
|
||||
.send()
|
||||
|
@ -409,7 +411,7 @@ async fn test_no_decompress() {
|
|||
assert_eq!(Bytes::from(dec), Bytes::from_static(STR.as_ref()));
|
||||
|
||||
// POST
|
||||
let mut res = Client::new()
|
||||
let mut res = client
|
||||
.post(srv.url("/"))
|
||||
.no_decompress()
|
||||
.send()
|
||||
|
|
|
@ -151,14 +151,14 @@ async fn test_h2_content_length() {
|
|||
for i in 0..4 {
|
||||
let req = srv
|
||||
.srequest(Method::GET, &format!("/{}", i))
|
||||
.timeout(Duration::from_secs(10))
|
||||
.timeout(Duration::from_secs(30))
|
||||
.send();
|
||||
let response = req.await.unwrap();
|
||||
assert_eq!(response.headers().get(&header), None);
|
||||
|
||||
let req = srv
|
||||
.srequest(Method::HEAD, &format!("/{}", i))
|
||||
.timeout(Duration::from_secs(10))
|
||||
.timeout(Duration::from_secs(30))
|
||||
.send();
|
||||
let response = req.await.unwrap();
|
||||
assert_eq!(response.headers().get(&header), None);
|
||||
|
@ -167,7 +167,7 @@ async fn test_h2_content_length() {
|
|||
for i in 4..6 {
|
||||
let req = srv
|
||||
.srequest(Method::GET, &format!("/{}", i))
|
||||
.timeout(Duration::from_secs(10))
|
||||
.timeout(Duration::from_secs(30))
|
||||
.send();
|
||||
let response = req.await.unwrap();
|
||||
assert_eq!(response.headers().get(&header), Some(&value));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue