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

Create separate receptorctl workflows with matrices #1003

Merged
merged 7 commits into from
May 1, 2024

Conversation

oraNod
Copy link
Collaborator

@oraNod oraNod commented Apr 16, 2024

This PR makes a number of changes:

  • Add separate receptorctl and lint-receptorctl workflows that the pull request workflow calls. This provides a bit more granularity so it's easier to update and reuse workflows.
  • Adds a nox session to create the receptorctl/.VERSION file so there is no need to call the makefile to run the receptorctl tests and lint sessions. It's probably better to call nox directly than to do makefile > noxfile.
  • Adds python version and session matrices to the receptorctl workflows, which ensures the correct version of Python is used for each step. This also makes it easier to add and update steps, for instance we could potentially add isort to the lint matrix.

Copy link

codecov bot commented Apr 16, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 41.14%. Comparing base (4b61542) to head (0399f35).
Report is 87 commits behind head on devel.

@@            Coverage Diff             @@
##            devel    #1003      +/-   ##
==========================================
- Coverage   41.15%   41.14%   -0.02%     
==========================================
  Files          42       42              
  Lines        6640     6640              
==========================================
- Hits         2733     2732       -1     
  Misses       3692     3692              
- Partials      215      216       +1     
Flag Coverage Δ
go 41.14% <ø> (-0.02%) ⬇️

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

see 2 files with indirect coverage changes

@oraNod oraNod marked this pull request as draft April 16, 2024 14:29
@oraNod oraNod force-pushed the workflow-python-version branch 4 times, most recently from e56309a to 008d3f5 Compare April 17, 2024 16:39
@oraNod oraNod changed the title Set python version matrix in workflow Create separate receptorctl workflows with matrices Apr 17, 2024
@oraNod oraNod marked this pull request as ready for review April 17, 2024 16:45
@oraNod oraNod requested a review from webknjaz April 17, 2024 16:50
@oraNod oraNod requested a review from webknjaz April 18, 2024 15:14
receptorctl/noxfile.py Outdated Show resolved Hide resolved
receptorctl/noxfile.py Outdated Show resolved Hide resolved
- 3.9

env:
FORCE_COLOR: 1
Copy link
Member

Choose a reason for hiding this comment

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

This one should colorize the output, which makes the CI log nicer. But I recommend playing with the rest of vars from https://github.com/ansible/pylibssh/blob/57e2802/.github/workflows/ci-cd.yml#L68-L73 / https://github.com/cherrypy/cheroot/blob/3591a1c/.github/workflows/ci-cd.yml#L61-L67 to see if there's more improvements from other vars. I know that there's a separate one for pre-commit, for example.

Copy link
Contributor

Choose a reason for hiding this comment

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

I like the idea of standardizing our approach

Copy link
Member

@webknjaz webknjaz left a comment

Choose a reason for hiding this comment

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

Let's try this: https://nox.thea.codes/en/stable/config.html#nox.sessions.Session.run_install.

(because session.run() seems to return early and give us a None under --no-install; ref: https://nox.thea.codes/en/stable/usage.html#re-using-virtualenvs)

receptorctl/noxfile.py Outdated Show resolved Hide resolved
receptorctl/noxfile.py Outdated Show resolved Hide resolved
receptorctl/noxfile.py Outdated Show resolved Hide resolved
.github/workflows/reusable_receptorctl_tests.yml Outdated Show resolved Hide resolved
@webknjaz
Copy link
Member

Additionally, having https://github.com/marketplace/actions/alls-green integrated would help with setting up a unified gate for branch protection. But that should probably be separate.

@oraNod
Copy link
Collaborator Author

oraNod commented Apr 18, 2024

Additionally, having https://github.com/marketplace/actions/alls-green integrated would help with setting up a unified gate for branch protection. But that should probably be separate.

Reminds me I still need to integrate that in the ansible-documentation repo.

receptorctl/noxfile.py Outdated Show resolved Hide resolved
oraNod and others added 4 commits April 30, 2024 09:44
Co-authored-by: Sviatoslav Sydorenko (Святослав Сидоренко) <[email protected]>
Co-authored-by: Sviatoslav Sydorenko (Святослав Сидоренко) <[email protected]>
oraNod and others added 2 commits April 30, 2024 09:50
Co-authored-by: Sviatoslav Sydorenko (Святослав Сидоренко) <[email protected]>
Copy link

sonarcloud bot commented Apr 30, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarCloud

@thom-at-redhat thom-at-redhat merged commit fd331c9 into ansible:devel May 1, 2024
21 checks passed
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.

3 participants