uwefladrich/scriptengine-tasks-ecearth

Split pytest action

Closed this issue · 0 comments

The Run pytest and coverage action (in .github/workflows/pytest.yml) has three tasks, all combined in one job:

  1. Lint with flake8
  2. Run pytest
  3. Run coverage and publish results to coverall

All tasks are run through the test matrix, spanning the supported Python versions. However, it doesn't really make sense to run the Linter with all Python versions, it is enough to do it once. The same is true for running coverage and pushing results to coverall.

Hence, it makes sense to split action into three jobs (lint, pytest, coverage) and have only the pytest job use the text matrix. Furthermore, the lint job can run in parallel of the other two, which have a dependency (pytest --> coverage).