Commit cb357aab authored by Ben Boeckel's avatar Ben Boeckel Committed by Kitware Robot
Browse files

Merge topic 'junit-test-results'

b997802d cargo: update public dependencies
0eb6f2d7 cargo: update easy dependencies
64e3b064 style: clean up non_exhaustive usages
560f460a gitlab-ci: also run clippy on the no-default-features build
65539f5b

 gitlab-ci: make junit reports
Acked-by: Kitware Robot's avatarKitware Robot <kwrobot@kitware.com>
Merge-request: !290
parents 1a6ae628 b997802d
......@@ -23,7 +23,7 @@ before_script:
# gone wrong here.
- .gitlab/ci/sccache.sh && export RUSTC_WRAPPER=$PWD/.gitlab/sccache
- rustup component add clippy
- cargo clippy --frozen --tests --all --verbose -- -D warnings
- cargo clippy --frozen $CARGO_FEATURES --tests --all --verbose -- -D warnings
- ".gitlab/sccache --show-stats || :"
.cargo_build: &cargo_build
......@@ -35,7 +35,8 @@ before_script:
- ".gitlab/sccache --show-stats || :"
.cargo_test: &cargo_test
- cargo test $CARGO_FEATURES --frozen --all --verbose
- .gitlab/ci/cargo2junit.sh
- cargo test --frozen $CARGO_FEATURES --all --verbose -- -Z unstable-options --format json --report-time | ./.gitlab/cargo2junit | tee junit.xml
.cargo_tarpaulin_build: &cargo_tarpaulin_build
- .gitlab/ci/sccache.sh && export RUSTC_WRAPPER=$PWD/.gitlab/sccache
......@@ -143,6 +144,11 @@ before_script:
- linux
script: *cargo_test
interruptible: true
artifacts:
when: always
reports:
junit:
- junit.xml
.cargo_tarpaulin_build_job: &cargo_tarpaulin_build_job
stage: build
......@@ -207,6 +213,12 @@ build:cargo-clippy:
- *rust_stable
- *cargo_cache_newest
build:cargo-clippy-no-default-features:
<<:
- *cargo_clippy_job
- *rust_stable_no_default_features
- *cargo_cache_newest
build:cargo-minimum:
<<:
- *cargo_build_job
......
#!/bin/sh
set -e
readonly version="master"
readonly version_full="$version-01041853b-20210429.0"
readonly sha256sum="b7b97e95d03c035020fdb23c3f0a86434c6e5025189e60cecc0f06c9919eba16"
readonly filename="cargo2junit-v$version-x86_64-unknown-linux-gnu"
cd .gitlab
echo "$sha256sum $filename" > cargo2junit.sha256sum
curl -OL "https://gitlab.kitware.com/api/v4/projects/6955/packages/generic/cargo2junit/v$version_full/cargo2junit-v$version-x86_64-unknown-linux-gnu"
sha256sum --check cargo2junit.sha256sum
mv "$filename" cargo2junit
chmod +x cargo2junit
......@@ -26,10 +26,10 @@ client_api = [
]
[dependencies]
base64 = "~0.12"
base64 = "~0.13"
derive_builder = "~0.9"
itertools = { version = "~0.8", optional = true }
log = "~0.4"
itertools = { version = "~0.10", optional = true }
log = "~0.4.4"
percent-encoding = { version = "^2.0", optional = true }
reqwest = { version = "~0.10.5", features = ["blocking", "json"], optional = true }
thiserror = { version = "^1.0.2", optional = true }
......@@ -42,9 +42,9 @@ graphql_client = { version = "~0.8", optional = true }
http = "~0.2"
serde = { version = "~1.0", features = ["derive"] }
serde_json = "^1.0"
serde_urlencoded = "~0.5"
serde_urlencoded = "~0.7"
url = "^2.1"
[dev-dependencies]
itertools = { version = "~0.8" }
itertools = { version = "~0.10" }
tokio = { version = "1.4.0", features = ["macros", "rt-multi-thread"] }
......@@ -12,8 +12,8 @@ use thiserror::Error;
use crate::api::PaginationError;
/// Errors which may occur when creating form data.
#[non_exhaustive]
#[derive(Debug, Error)]
#[non_exhaustive]
pub enum BodyError {
/// Body data could not be serialized from form parameters.
#[error("failed to URL encode form parameters: {}", source)]
......@@ -25,8 +25,8 @@ pub enum BodyError {
}
/// Errors which may occur when using API endpoints.
#[non_exhaustive]
#[derive(Debug, Error)]
#[non_exhaustive]
pub enum ApiError<E>
where
E: Error + Send + Sync + 'static,
......
......@@ -15,8 +15,8 @@ use url::Url;
use crate::api::{query, ApiError, AsyncClient, AsyncQuery, Client, Endpoint, Query};
/// Errors which may occur with pagination.
#[non_exhaustive]
#[derive(Debug, Error)]
#[non_exhaustive]
pub enum PaginationError {
/// A `Link` HTTP header can fail to parse.
#[error("failed to parse a Link HTTP header: {}", source)]
......
......@@ -8,8 +8,8 @@ use http::{HeaderMap, HeaderValue};
use log::error;
use thiserror::Error;
#[non_exhaustive]
#[derive(Debug, Error)]
#[non_exhaustive]
pub enum AuthError {
#[error("header value error: {}", source)]
HeaderValue {
......
......@@ -26,8 +26,8 @@ use crate::api::{self, AsyncQuery, Query};
use crate::auth::{Auth, AuthError};
use crate::types::*;
#[non_exhaustive]
#[derive(Debug, Error)]
#[non_exhaustive]
pub enum GitlabError {
#[error("failed to parse url: {}", source)]
UrlParse {
......@@ -274,8 +274,8 @@ impl Gitlab {
}
}
#[non_exhaustive]
#[derive(Debug, Error)]
#[non_exhaustive]
pub enum RestError {
#[error("error setting auth header: {}", source)]
AuthError {
......
......@@ -6,9 +6,6 @@
// TODO: Document API entities.
// #![warn(missing_docs)]
// XXX(rust-1.45): #[non_exhaustive] is allowed now.
#![allow(unknown_lints)]
#![allow(clippy::manual_non_exhaustive)]
//! A library for communicating with Gitlab instances.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment