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

General improvements for CI and project versioning #30

Merged
merged 5 commits into from
Jun 6, 2023

Conversation

gruberdev
Copy link
Collaborator

@gruberdev gruberdev commented Jun 6, 2023

PR Changelog:

  • I have updated and fixed the poetry.lock file for compatibility with newer versions of poetry. Additionally, the lock version has been upgraded to 2.0.0.
  • My changes were locally tested using the Act-cli tool. I've also modified the Makefile to detect if Act-cli is available on your $PATH, which will enable you to run the make test-local command from the root folder of the project.
  • I've replaced abatilo/actions-poetry@v2 with snok/install-poetry@v1, as the latter seems to perform faster locally without caching. Furthermore, the snok/install-poetry project appears to be better maintained and more active.
  • Removed some minor trailing spaces on lines.
  • Github Action changes

    • Changed proposed isolates the build job by creating an additional, dependent job called release, which has steps that should only be executed when running push against the master branch.
    • I've also added an $env.ACT environment variable as one of the conditions for the release job, mainly as a way to prevent the local environment from running it.
    • The artifact feature used by GHA has limited support to environments such as the one act creates, as mentioned here, I used the solution provided by the following comment in order to fix this issue.
    • Python and Poetry have been pinned to specific recent versions (v3.11.3 and v1.5.1 respectively) that are tested and confirmed working. Wildcards were removed wherever possible. I strongly recommend using an automated dependency management tool such as Renovate.
    • As mentioned in the first item, I've included a more detailed step strategy to prevent Pull Requests code from being executed and released when running against Master branches. This is not primarily a security feature, but rather a way to prevent the unintentional usage of the action to create releases when proposing changes.
    • Python's setup version action version has been upgraded.

I recommend local testing of this PR both in a traditional Python3 virtual environment and using the Act-cli testing tool. Any feedback is more than welcome.

@gruberdev gruberdev requested a review from cedws June 6, 2023 08:18
@cedws
Copy link
Owner

cedws commented Jun 6, 2023

Nice work 👍 let's give this a shot

@cedws cedws merged commit 833fb6b into cedws:master Jun 6, 2023
2 checks passed
@thomasmerz thomasmerz mentioned this pull request Jul 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants