From b4b53cbb6ee6e171485aa316fe08ce2cc4201848 Mon Sep 17 00:00:00 2001 From: TriplEight Date: Fri, 9 Aug 2019 14:07:41 +0200 Subject: [PATCH] Check for warnings (#2850) * check for warnings * test run * prebuild wasm binaries, pre-test is not needed for now * will run everywhere but PRs * lost warnings * lost warnings * try warnings with tests * Update expected stderr in UI tests * added to RUSTFLAGS * another way of collecting warnings * bump impl_version * fix int tests parser * revert demis changes and impl version bump * no need to collect warnings in int test --- substrate/.gitlab-ci.yml | 32 ++++++++++++++++++++++++++++++-- 1 file changed, 30 insertions(+), 2 deletions(-) diff --git a/substrate/.gitlab-ci.yml b/substrate/.gitlab-ci.yml index bd0fd9f08f..7889b52afa 100644 --- a/substrate/.gitlab-ci.yml +++ b/substrate/.gitlab-ci.yml @@ -121,8 +121,17 @@ test-linux-stable: &test-linux variables: - $DEPLOY_TAG script: - - time cargo test --all --release --verbose --locked + - time cargo test --all --release --verbose --locked | + tee output.log - sccache -s + after_script: + - echo "___Collecting warnings for check_warnings job___" + - awk '/^warning:/,/^$/ { print }' output.log > ${CI_COMMIT_SHORT_SHA}_warnings.log + artifacts: + name: $CI_COMMIT_SHORT_SHA + expire_in: 24 hrs + paths: + - ${CI_COMMIT_SHORT_SHA}_warnings.log test-srml-staking: &test-srml-staking @@ -165,7 +174,7 @@ test-linux-stable-int: &> ${CI_COMMIT_SHORT_SHA}_int_failure.log - sccache -s after_script: - - awk '/FAILED/,0' ${CI_COMMIT_SHORT_SHA}_int_failure.log + - awk '/FAILED|^error\[/,0' ${CI_COMMIT_SHORT_SHA}_int_failure.log artifacts: name: $CI_COMMIT_SHORT_SHA when: on_failure @@ -281,6 +290,25 @@ build-rust-doc-release: - echo "" > ./crate-docs/index.html - sccache -s +check_warnings: + stage: build + <<: *docker-env + except: + variables: + - $DEPLOY_TAG + variables: + GIT_STRATEGY: none + dependencies: + - test-linux-stable + script: + - if [ -s ${CI_COMMIT_SHORT_SHA}_warnings.log ]; then + cat ${CI_COMMIT_SHORT_SHA}_warnings.log; + exit 1; + else + echo "___No warnings___"; + fi + allow_failure: true + #### stage: publish .publish-docker-release: &publish-docker-release