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

Enhancement: split liniting and testing workflows #256

Merged
merged 4 commits into from
Dec 22, 2023

Conversation

CM000n
Copy link
Collaborator

@CM000n CM000n commented Dec 22, 2023

Hello, with this MR some of the workflow changes we have made in the course of the API changeover will be outsourced.

Background:
During development, we realised that the development work was unnecessarily prolonged and complicated because the complete test suite runs automatically with every commit. This is not good behaviour and is not particularly resource-efficient in terms of time and money.
Normally you want to run tests deliberately and only where they are really needed. For example, in PR pipelines or before deployments.
Running them with every commit means additional time for the developer and can also lead to additional costs in other contexts, for example if the tests are run against a cluster or cloud storage.

PR impact:

  • This PR removes the test runs from the pre-commit hooks. They now only run when merge requests are created. A misconfiguration of Coverage is also fixed with this PR. Coverage currently runs on the complete repository code and not on the source code for which the test coverage is actually to be determined. The additional parameter --source=mytoyota/ is now used for this when executing Coerage.
  • moved conftest.py file to the tests folder. This does not belong in the main level of a repo.
  • In addition, a pre-commit hook has been introduced to indicate that commits should not be pushed against the main or master branch. A suggestion would also be to introduce corresponding branch protection here.
  • Only one Python version is used for linting, as it makes no sense to perform linting using a matrix build and several Python versions.

Copy link

codecov bot commented Dec 22, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (07e9f72) 80.99% compared to head (cf28bd5) 75.23%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #256      +/-   ##
==========================================
- Coverage   80.99%   75.23%   -5.77%     
==========================================
  Files          33       27       -6     
  Lines        1384     1280     -104     
==========================================
- Hits         1121      963     -158     
- Misses        263      317      +54     
Flag Coverage Δ
unittests 75.23% <ø> (-5.77%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

DurgNomis-drol
DurgNomis-drol previously approved these changes Dec 22, 2023
@CM000n
Copy link
Collaborator Author

CM000n commented Dec 22, 2023

Hi @DurgNomis-drol , could you approve the MR again. 😊
I had to merge the master branch into the feature branch, which caused your approval to be discarded

@CM000n CM000n merged commit 057595f into master Dec 22, 2023
25 checks passed
@CM000n CM000n deleted the enhancement/split_liniting_and_testing_workflows branch December 22, 2023 19:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants