Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add codecov threshold #480

Merged
merged 5 commits into from
Dec 2, 2023
Merged

add codecov threshold #480

merged 5 commits into from
Dec 2, 2023

Conversation

ericphanson
Copy link
Member

@ericphanson ericphanson commented Dec 2, 2023

@ericphanson ericphanson changed the base branch from master to dpa/merge-queue December 2, 2023 15:26
Copy link
Member

@DilumAluthge DilumAluthge left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Personally, I want us to keep enforcing that master must have 100% code coverage.

I think the better approach would be to figure out how to write unit tests to cover the last few lines that are uncovered by unit tests currently (but are covered by our integration tests).

Copy link

codecov bot commented Dec 2, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (9b7249f) 99.24% compared to head (85b2189) 99.24%.
Report is 2 commits behind head on dpa/merge-queue.

Additional details and impacted files
@@               Coverage Diff                @@
##           dpa/merge-queue     #480   +/-   ##
================================================
  Coverage            99.24%   99.24%           
================================================
  Files                   12       12           
  Lines                  395      395           
================================================
  Hits                   392      392           
  Misses                   3        3           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@ericphanson
Copy link
Member Author

I wonder if this configuration would work for that?

codecov.yml Show resolved Hide resolved
@DilumAluthge
Copy link
Member

DilumAluthge commented Dec 2, 2023

Hmmm, so in the current state of this PR, it would allow the merge_group job to have code coverage strictly less than 100%, right?

@ericphanson
Copy link
Member Author

I don't really understand if this is about the branch we are merging from (/ running on), or the branch we are merging into. Either way I think this is incomplete though. If it is the branch we are running on, then we want the merge-queue branch to have the strict checks, not just main itself. If it is the branch we are merging into, then this won't help for PRs to main.

@ericphanson
Copy link
Member Author

I think maybe it does support regex actually. The docs are very incomplete but I found some old ones that suggested it does (and some older ones that suggested it didn't then)

@ericphanson
Copy link
Member Author

Ok, I had to fix the syntax a bit, but this now validates:

curl -X POST --data-binary @codecov.yml https://codecov.io/validate
Valid!

{
  "coverage": {
    "status": {
      "project": {
        "main": {
          "branches": [
            "^main$",
            "^gh-readonly-queue/main/.*"
          ],
          "target": 100.0
        },
        "default": {
          "target": 98.0
        }
      }
    }
  }
}

@DilumAluthge
Copy link
Member

How would we go about testing this to make sure it works the way we want?

@ericphanson
Copy link
Member Author

I think the easiest way is just by merging things. We can test the happy path by merging this and your PR down. Then we can test the failure path by deleting the integration tests and seeing if that merges down. If so we can revert back.

@DilumAluthge DilumAluthge merged commit 89b737d into dpa/merge-queue Dec 2, 2023
9 checks passed
@DilumAluthge DilumAluthge deleted the eph/threshold branch December 2, 2023 17:06
github-merge-queue bot pushed a commit that referenced this pull request Jan 8, 2024
…, and add some more unit tests (#477)

* Run the integration tests on the `merge_group` event

* Run the unit tests on the `merge_group` event

* Delete `bors.toml` (the Bors config file)

* CompatHelper's own Project.toml: add compat entries for our own test deps (#478)

* Update .github/workflows/ci_integration.yml

Co-authored-by: mattBrzezinski <matt.brzezinski@invenia.ca>

* Update ci_integration.yml

* Upload code coverage from the unit tests

* Integration tests: immediately error if this is a PR build

* Mark the integration tests as "skipped" on PR builds (#479)

* Simplify the job name of the integration tests job

This is necessary because the `${{ matrix... }}` interpolations are not evaluated for skipped jobs

* Do some debugging

* Revert the debugging commit

* Don't use a matrix for the integration test job

* Do some debugging

* Revert the debugging commit

* Delete some commented-out lines

* Fix a comment

* add codecov threshold (#480)

* add codecov threshold

to help with #477

* Update codecov.yml

* fix indentation

* Update codecov.yml

* Update codecov.yml

* Apply suggestions from code review

Co-authored-by: Dilum Aluthge <dilum@aluthge.com>

* Update codecov.yml

* try to make two settings exclusive

* Refactor some code, and increase the unit test code coverage for `src/main.jl` (#481)

* Revert the changes to `codecov.yml` (#482)

* Lower Codecov threshold to 99% because of GitHub Merge Queue limitations (#484)

---------

Co-authored-by: Eric Hanson <5846501+ericphanson@users.noreply.github.com>
Co-authored-by: mattBrzezinski <matt.brzezinski@invenia.ca>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants