Skip to content

Skip tests without optional dependencies in lean CI#2196

Open
brownbaerchen wants to merge 1 commit intohelmholtz-analytics:mainfrom
brownbaerchen:leanest_CI
Open

Skip tests without optional dependencies in lean CI#2196
brownbaerchen wants to merge 1 commit intohelmholtz-analytics:mainfrom
brownbaerchen:leanest_CI

Conversation

@brownbaerchen
Copy link
Collaborator

Description

The CI can be more lean! Afaik, when installing optional dependencies, we only run more tests than without. So there is no need to also run without optional dependencies in the lean CI in my opinion. This halves the number of jobs spawned by the lean CI.
On the other hand, I do think the lean CI should run the linter.

ReceivePR should not run any tests or linters in my opinion. The workflows should be as simple as possible.

Changes proposed:

  • Run lean CI only with all optional dependencies
  • Run linter in lean CI
  • Small refactor of lean CI
  • Do not run tests in ReceivePR
  • Do not run linter in ReceivePR

Copy link
Collaborator

@mtar mtar left a comment

Choose a reason for hiding this comment

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

Thank you. Here are some thoughts I have about this.

Comment on lines 22 to 32
- name: Use Python
uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # v6.1.0
with:
python-version: '3.14'
architecture: x64

- name: Setup MPI
uses: mpi4py/setup-mpi@40c19a60792debf8ca403a3e6ee5f84c4e76555d # v1.2.1
with:
mpi: openmpi

Copy link
Collaborator

Choose a reason for hiding this comment

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

These steps are not necessary any longer without the test.

Copy link
Collaborator

Choose a reason for hiding this comment

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

The script should run after the lean CI.

- '3.14' # Latest stable
mpi: [ 'openmpi' ]
install-options: [ '.', '.[hdf5,netcdf,pandas,zarr]' ]
install-options: [ '.[hdf5,netcdf,pandas,zarr,dev]' ]
Copy link
Collaborator

Choose a reason for hiding this comment

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

While we don't need to test the all combinations without the optional dependencies, I still recommend a single one. In the past, we had to fix some bugs because a non-dependency was overlooked at some point.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

2 participants