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

chore(ci): add code coverage support #84

Merged
merged 1 commit into from
Apr 3, 2024
Merged

Conversation

evansims
Copy link
Member

@evansims evansims commented Apr 2, 2024

Description

This PR introduces Codecov to our CI for better test coverage. I've set the minimum coverage at 60%, which is currently above our 68% coverage level. This ensures a solid starting point for enhancements.

Additionally, it integrates essential tools (flake8, black, isort, autoflake) directly into our test workflow. This helps us catch issues introduced in individual PRs, rather than relying solely on the SDK generator output.

This PR reflects changes directly from the SDK generator. Once validated here, a separate PR will update the repository and other SDKs.

References

N/A

Review Checklist

  • I have clicked on "allow edits by maintainers".
  • I have added documentation for new/changed functionality in this PR or in a PR to openfga.dev [Provide a link to any relevant PRs in the references section above]
  • The correct base branch is being used, if not main
  • I have added tests to validate that the change in functionality is working as expected

@evansims evansims added the github_actions Pull requests that update GitHub Actions code label Apr 2, 2024
@@ -6,42 +6,72 @@ on:
pull_request:
workflow_dispatch:

concurrency:
Copy link
Member Author

@evansims evansims Apr 2, 2024

Choose a reason for hiding this comment

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

Support canceling in progress, but redundant workflow runs when a pull request is rapidly updated. All other runs behave as always.

@codecov-commenter
Copy link

Welcome to Codecov 🎉

Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests.

Thanks for integrating Codecov - We've got you covered ☂️

@evansims evansims marked this pull request as ready for review April 2, 2024 23:35
@evansims evansims requested a review from a team as a code owner April 2, 2024 23:35
@evansims evansims force-pushed the chore/ci/setup-codecov branch from 0d0f91d to c41e101 Compare April 2, 2024 23:36
@@ -10,7 +10,6 @@
NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT.
"""


Copy link
Member Author

Choose a reason for hiding this comment

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

This is necessary to make the linter happy and pass the tests. I will check why it's catching it here, but the Generator output isn't.

@@ -1,6 +1,10 @@
-r requirements.txt

mock >= 5.1.0, < 6
autoflake==2.3.0
Copy link
Member Author

Choose a reason for hiding this comment

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

These are usually installed directly in the Generator's Makefile, but since we'll also be running tests here, let's transition them into the development dependencies manifest directly.

@evansims evansims enabled auto-merge April 2, 2024 23:41
@evansims evansims force-pushed the chore/ci/setup-codecov branch 3 times, most recently from 5b5c4f1 to 86f17b0 Compare April 2, 2024 23:45
.github/workflows/main.yml Outdated Show resolved Hide resolved
.openapi-generator/FILES Outdated Show resolved Hide resolved
@evansims evansims force-pushed the chore/ci/setup-codecov branch from a32dfa7 to 3b0208c Compare April 3, 2024 04:21
@evansims
Copy link
Member Author

evansims commented Apr 3, 2024

@rhamzeh Updated based on your feedback 👍

@evansims evansims added this pull request to the merge queue Apr 3, 2024
Merged via the queue into main with commit b6ef82d Apr 3, 2024
17 checks passed
@evansims evansims deleted the chore/ci/setup-codecov branch April 3, 2024 06:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
github_actions Pull requests that update GitHub Actions code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants