From 89f1a0468a7babc0d91cab44d4bb26e0391b082a Mon Sep 17 00:00:00 2001 From: Kyle Altendorf Date: Tue, 16 Apr 2024 16:31:20 -0400 Subject: [PATCH] exclude `config.py` from diff-cover as well (#17873) * debug * exclude `config.py` from diff-cover as well * actually pass the config path... * Revert "debug" This reverts commit 863989f53865b539504e0c2da2eb7d7c9ac8698b. * just `*` * Revert "Revert "debug"" This reverts commit 0855bc795ce34ca2a3c1e23c75ac2eb8b8359a3a. * leading `*/`? * Revert "leading `*/`?" This reverts commit 5067869b59bc3bc431023182c24b1f8ad8efac99. * Revert "Revert "leading `*/`?"" This reverts commit 5f09e6211e61395d15057c917ef6662de5957601. * Revert "Revert "Revert "debug""" This reverts commit a788ec16911dbd3179c212067eb15ee99aaecb9d. --- .diffcover.toml | 4 ++++ .github/workflows/test.yml | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 .diffcover.toml diff --git a/.diffcover.toml b/.diffcover.toml new file mode 100644 index 000000000000..1d570898d109 --- /dev/null +++ b/.diffcover.toml @@ -0,0 +1,4 @@ +[tool.diff_cover] +exclude = [ + "*/chia/_tests/*/config.py", +] diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index d2ca14540aa3..eb450efdea3e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -226,7 +226,7 @@ jobs: env: compare-branch: ${{ github.base_ref == '' && github.event.before || format('origin/{0}', github.base_ref) }} run: | - diff-cover --compare-branch=${{ env.compare-branch }} --fail-under=100 --html-report=coverage-reports/diff-cover.html --markdown-report=coverage-reports/diff-cover.md coverage-reports/coverage.xml | tee coverage-reports/diff-cover-stdout + diff-cover --config-file=.diffcover.toml --compare-branch=${{ env.compare-branch }} --fail-under=100 --html-report=coverage-reports/diff-cover.html --markdown-report=coverage-reports/diff-cover.md coverage-reports/coverage.xml | tee coverage-reports/diff-cover-stdout COV_STATUS="${PIPESTATUS[0]}" echo "COV_STATUS=$COV_STATUS" >> "$GITHUB_ENV" if [[ $COV_STATUS != '0' && "$GITHUB_BASE_REF" != '' ]]; then