Skip to content

ci: Revamp CI#503

Merged
ValerianRey merged 27 commits intomainfrom
improve-ci
Dec 30, 2025
Merged

ci: Revamp CI#503
ValerianRey merged 27 commits intomainfrom
improve-ci

Conversation

@ValerianRey
Copy link
Copy Markdown
Contributor

@ValerianRey ValerianRey commented Dec 28, 2025

First of all, some information about how to reduce redundancy in ci:

  • Anchors can be used to repeat some text within the same yaml file (syntax: &anchor when defining it, *anchor when reusing it)
  • Composite actions can be defined in the actions folder. These actions are different from workflows in the fact that github doesn't try to run them (they don't have the on: key at the beginning). But they're made to be used by other actions or workflows either from the same repo or from a different repo.
  • Entire workflows can also be reused. I don't think we need that at all for now.

The issue with anchors is that they cannot be shared between files. So it's not really suitable for things like setting up uv and installing dependencies.

The issue with actions is that it's a bit more verbose (one line per parameter) and it adds one folder + the action.yml file for each of them (it's not allowed to just have action-name.yml outside of any folder). Another issue is that we need to checkout the repo before being able to use an action that is defined locally. So we cannot factorize the Checkout repository action.

This PR changes quite a few things in the CI:

  • Remove redundant specification of python-version. The python-version argument used when setting up uv is sufficient.
  • Remove the now unnecessary PYTHON_VERSION environment variable from the env of workflows.
  • Create composite action to install dependencies, with options and groups as inputs.
  • Add name to the checkout step
  • Add anchor upload-codecov in tests.yml
  • Add pytest.skip in test_nash_mtl.py and test_cagrad.py so that we don't have to use ignore flags when running pytest with default install (i.e. without nashmtl and cagrad dependencies installed).
  • Factorize all steps running tests to a single step that has default values for all params + a list of overrides.

Note that this significantly reduces the number of tests to run, so it should reduce the chance that one of the runners is queued and slows the CI down.

@codecov
Copy link
Copy Markdown

codecov bot commented Dec 28, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@ValerianRey ValerianRey changed the title improve ci ci: Revamp CI Dec 28, 2025
@ValerianRey ValerianRey marked this pull request as ready for review December 28, 2025 18:13
@ValerianRey ValerianRey self-assigned this Dec 28, 2025
@ValerianRey ValerianRey added the cc: ci Conventional commit type for changes to the CI (Github workflows and actions). label Dec 28, 2025
@ValerianRey
Copy link
Copy Markdown
Contributor Author

@PierreQuinton This seems to work. It was mostly vibe-coded so let's be careful.

@ValerianRey
Copy link
Copy Markdown
Contributor Author

@PierreQuinton seems ok to merge?

@PierreQuinton
Copy link
Copy Markdown
Contributor

Not super qualified, but this does look like a strict improvement, so in my opinion, we can meege and worst case we'll improve later.

@ValerianRey ValerianRey merged commit 4de55ab into main Dec 30, 2025
14 checks passed
@ValerianRey ValerianRey deleted the improve-ci branch December 30, 2025 01:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cc: ci Conventional commit type for changes to the CI (Github workflows and actions).

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants