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

Several updates/fixes to project's CI #300

Merged
merged 14 commits into from
May 23, 2024
Merged

Several updates/fixes to project's CI #300

merged 14 commits into from
May 23, 2024

Conversation

ItsDrike
Copy link
Member

@ItsDrike ItsDrike commented May 21, 2024

This fixes various issues with the current github workflows, and makes several improvements / updates to bring them up to date with standards or to simplify them.

Note: This PR fixes previously broken Python 3.8 support for the library. (Further explained below)

  • Fix CI not running unit tests on python 3.8 (only 3.11).
    For some reason, I apparently just hard-coded the python version, even though the CI was running in a matrix, this was missleading, as it lead to the tests never actually running on python 3.8. Over time, this has resulted in some issues and the code wans't actually even runnable on 3.8. This PR also fixes these issues.
  • Update to use python 3.12 (in validation and as one of the matrix versions in unit-tests workflow).
    The original workflows were still using 3.11 as the latest python version.
  • Trigger and run lint and unit-tests workflows form a single main CI workflow.
    This allows for easier set up of required workflows for the repo, and unifies some logic, like concurrency config, hence reducing code repetition.
  • Only send status embed after the main CI workflow finishes (not for both unit-tests and validation).
    Made possible because of the workflow unification. This change reduces the amount of spam in the discord channel with github hooks, as we don't need to see the status of both validation and unit-tests separately, it is more than enough to just have it send back a final status of the unified workflow.
  • Fix the status-embed workflow.
    After a recent change made to the project, the code that was uploading a workflow artifact with the PR data has been removed by accident, this adds the code back, this time into the new unified CI workflow.

P.S.: The code to make tests runnable on 3.8 is incredibly cursed, but the version will be dropped some time this year, so it's not a huge issue and it is only affecting the tests code, this logic doesn't touch any of the public library code.

@ItsDrike ItsDrike force-pushed the update-ci branch 3 times, most recently from a251811 to 859c8e1 Compare May 21, 2024 22:14
@ItsDrike ItsDrike force-pushed the update-ci branch 3 times, most recently from 1c52996 to aba9fb3 Compare May 21, 2024 22:40
This code hurts to write and to look at.

But well, it makes pytest work, what can you do...
@ItsDrike ItsDrike added t: bug Something isn't working t: enhancement Improvement to an existing feature p: 1 - high This should be addressed quickly a: CI Related to continuous integration and deployment a: dependencies Related to package dependencies and management a: tests Related to unit or integration tests t: optimization Optimizations to the code (performance improvements, code cleanup, or other general optimizations) labels May 23, 2024
@ItsDrike ItsDrike marked this pull request as ready for review May 23, 2024 12:53
@ItsDrike ItsDrike merged commit edf130f into main May 23, 2024
13 checks passed
@ItsDrike ItsDrike deleted the update-ci branch May 23, 2024 13:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a: CI Related to continuous integration and deployment a: dependencies Related to package dependencies and management a: tests Related to unit or integration tests p: 1 - high This should be addressed quickly t: bug Something isn't working t: enhancement Improvement to an existing feature t: optimization Optimizations to the code (performance improvements, code cleanup, or other general optimizations)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant