ansible / ansible-documentation

Ansible community documentation
https://docs.ansible.com/
GNU General Public License v3.0
63 stars 369 forks source link

dev pip-compile: switch devel branch pip-compile to 3.11 #1616

Open gotmax23 opened 2 weeks ago

gotmax23 commented 2 weeks ago

This adjusts the devel branch to use Python 3.11 to generate dependencies with pip-compile. This also adjusts the pip-compile-dev workflow to run separate jobs for the stable branches, which will still use Python 3.10 for requirements files. It's not a very DRY approach; Github Actions does not support loops.

Fixes: https://github.com/ansible/ansible-documentation/issues/1614 Fixes: https://github.com/ansible/ansible-documentation/issues/1450

webknjaz commented 2 weeks ago

It's not a very DRY approach; Github Actions does not support loops.

That's not really true: you can have a matrix definition that calls a reusable workflow and passes matrix factors in. This does work, both me and Don have used this approach in the past.

UPD: What doesn't work is skipping some jobs in an event-dependent manner with just declarative syntax. This can be solved by a separate job that pre-computes the matrix, though.

gotmax23 commented 2 weeks ago

you can have a matrix definition that calls a reusable workflow

That's true. I'm not sure why I completely forgot about matrices. I'll try to refactor this.

gotmax23 commented 3 days ago

I'll work on this later this month, after I get back from vacation.