From 08127d1eb358a085ab50e5187335c0a12f56efd5 Mon Sep 17 00:00:00 2001 From: Alex Li Date: Mon, 16 Dec 2024 14:36:29 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=92=9A=20Fix=20invalid=20codecov=20config?= =?UTF-8?q?=20(#622)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- codecov.yaml => codecov.yml | 6 +++--- scripts/coverage.sh | 8 ++++++-- 2 files changed, 9 insertions(+), 5 deletions(-) rename codecov.yaml => codecov.yml (81%) diff --git a/codecov.yaml b/codecov.yml similarity index 81% rename from codecov.yaml rename to codecov.yml index 55a9de65..54620e69 100644 --- a/codecov.yaml +++ b/codecov.yml @@ -1,7 +1,7 @@ -# https://docs.codecov.io/docs/commit-status codecov: notify: - require_ci_to_pass: yes + wait_for_ci: true + require_ci_to_pass: yes coverage: status: @@ -10,7 +10,7 @@ coverage: # basic target: 0% threshold: 0% - base: 0% + base: auto # advanced branches: null if_no_uploads: error diff --git a/scripts/coverage.sh b/scripts/coverage.sh index fba06aed..8bac702f 100755 --- a/scripts/coverage.sh +++ b/scripts/coverage.sh @@ -1,10 +1,14 @@ #!/usr/bin/env bash +set -e set -o pipefail +# Validate the configurations. +curl --data-binary @codecov.yml https://codecov.io/validate + DIR="${1}" -cd ${DIR} +cd "${DIR}" || exit + dart pub global activate coverage dart run coverage:test_with_coverage --port=9292 format_coverage --lcov --in=coverage --out=coverage.lcov --report-on=lib -