8000 Speed up and simplify github workflows by sdb9696 · Pull Request #1128 · python-kasa/python-kasa · GitHub
[go: up one dir, main page]

Skip to content

Speed up and simplify github workflows #1128

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

Merged
merged 8 commits into from
Sep 27, 2024
Merged

Conversation

sdb9696
Copy link
Collaborator
@sdb9696 sdb9696 commented Sep 26, 2024
  • Enable parallel tests in the CI with pytest-xdist
  • Migrate to the official astral-sh/setup-uv github action
  • Call pre-commit run as a single job in CI instead of relisting each check
  • Use uv version 0.4.16
  • Fix bug with pre-commit cache
  • Update publish.yml to use astral-sh/setup-uv

@sdb9696 sdb9696 force-pushed the janitor/parallel_tests branch from 5287735 to 188a0fc Compare September 26, 2024 12:59
@sdb9696 sdb9696 changed the title y Enable parallel tests with pytest-xdist Sep 26, 2024
Copy link
codecov bot commented Sep 26, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 92.62%. Comparing base (1ab08f4) to head (bbf1667).
Report is 207 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1128   +/-   ##
=======================================
  Coverage   92.62%   92.62%           
=======================================
  Files          96       96           
  Lines        6117     6117           
  Branches     1510     1510           
=======================================
  Hits         5666     5666           
  Misses        353      353           
  Partials       98       98           

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

@rytilahti rytilahti added this to the 0.7.4 milestone Sep 26, 2024
uv run pre-commit run debug-statements --all-files
- name: "Run check-ast"

- name: "Run pre-commit checks"
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Looks like we were missing the ruff format, check-yaml and doc8 from the CI. It's probably better to just run all the checks in a single step and pass --verbose to avoid having to keep them in sync.

Copy link
Member

Choose a reason for hiding this comment

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

Yes, no need to repeat oneself here, I have been wanting to do this for a while 👍

Comment on lines 20 to 24
- name: Install uv
uses: astral-sh/setup-uv@v2
with:
enable-cache: true
cache-dependency-glob: "uv.lock"
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This became an official astral action a few weeks ago and makes life so much easier that we don't have to do the pipx caching manually that we had to for poetry.

@sdb9696 sdb9696 changed the title Enable parallel tests with pytest-xdist Speed up and simplify the github CI workflow Sep 27, 2024
@sdb9696 sdb9696 changed the title Speed up and simplify the github CI workflow Speed up and simplify github workflows Sep 27, 2024
@sdb9696 sdb9696 marked this pull request as ready for review September 27, 2024 08:19
Copy link
Member
@rytilahti rytilahti left a comment

Choose a reason for hiding this comment

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

Looks great! 💯

uv run pre-commit run debug-statements --all-files
- name: "Run check-ast"

- name: "Run pre-commit checks"
Copy link
Member

Choose a reason for hiding this comment

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

Yes, no need to repeat oneself here, I have been wanting to do this for a while 👍

@sdb9696 sdb9696 added the maintenance Project improvements and maintenance label Sep 27, 2024
@sdb9696 sdb9696 merged commit 038b699 into master Sep 27, 2024
28 checks passed
@sdb9696 sdb9696 deleted the janitor/parallel_tests branch September 27, 2024 09:27
@sdb9696 sdb9696 mentioned this pull request Sep 27, 2024
sdb9696 added a commit that referenced this pull request Sep 27, 2024
## [0.7.4](https://github.com/python-kasa/python-kasa/tree/0.7.4) (2024-09-27)

[Full Changelog](0.7.3...0.7.4)

**Release summary:**

- KL135 color temp range corrected to 9000k max
- Minor enhancements and project maintenance

**Implemented enhancements:**

- Add factory\_reset\(\) to iotdevice [\#1125](#1125) (@rytilahti)
- Add reboot\(\) to the device interface [\#1124](#1124) (@rytilahti)
- Add factory-reset command to cli [\#1108](#1108) (@rytilahti)

**Fixed bugs:**

- Extend KL135 ct range up to 9000K [\#1123](#1123) (@rytilahti)
- Fix cli command for device off [\#1121](#1121) (@sdb9696)

**Project maintenance:**

- Use pytest-socket to ensure no tests are performing io [\#1133](#1133) (@sdb9696)
- Enable ruff lint pycodestyle warnings [\#1132](#1132) (@sdb9696)
- Add autouse fixture to patch asyncio.sleep [\#1131](#1131) (@sdb9696)
- Mock asyncio.sleep for klapprotocol tests [\#1130](#1130) (@rytilahti)
- Add fixture for T110 fw 1.9.0 [\#1129](#1129) (@rytilahti)
- Speed up and simplify github workflows [\#1128](#1128) (@sdb9696)
- Add KS200M\(US\) fw 1.0.12 fixture [\#1127](#1127) (@GatorEG)
- Add stale PR/Issue github workflow [\#1126](#1126) (@sdb9696)
- Add fixture for KL135\(US\) fw 1.0.15 [\#1122](#1122) (@rytilahti)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintenance Project improvements and maintenance
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0