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

github actions; all projects #11

Merged
merged 20 commits into from
Feb 3, 2021

Conversation

jonapich
Copy link
Collaborator

This enables tests and publish on all projects.

There's a really weird behavior on mac where platform.node() changes from a . to a - mid execution. 🤷🏻‍♂️

Other than that, even though docker is installed on github action machines, they're configured for non-linux containers. The docker tests will fail trying to build the dockerfile. So I skipped those tests unless we're on linux.

The readmes were created just for the sake of the pyproject.toml and will be updated through #10

@jonapich jonapich changed the base branch from main to feature/github-actions January 28, 2021 22:16
Copy link
Collaborator

@klalumiere klalumiere left a comment

Choose a reason for hiding this comment

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

I'm quite uncomfortable with the 8 copy pastes. A single update will take 9 times longer to write and will also be longer to review. Moreover, if you add more packages, like coveo-magic, well that's a copy-paste more. We should at least discuss the possibility to use a local action with parameterized name. A typical counterargument against this approach is

Yeah, but what if I want to make .github/workflows/coveo-systools.hml different?

and the counterargument to that counterargument is that, of course, you can. Once the local action is written, you still have the option to use it or not.

@@ -11,6 +11,8 @@
from coveo_testing.parametrize import parametrize
from coveo_testing.temporary_resource.unique_id import TestId, unique_test_id

_ = unique_test_id # mark fixtures are used
Copy link
Collaborator

Choose a reason for hiding this comment

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

Did you mean

Suggested change
_ = unique_test_id # mark fixtures are used
_ = unique_test_id # mark fixtures as used

?
(I feel like an auto-correct 😆)

with:
project-name: ${{ github.workflow }}
pypi-token: ${{ secrets.PYPI_TOKEN }}
dry-run: ${{ github.ref != 'refs/heads/main' }}
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'm starting to guess that I'll review the same workflow with different name and paths. Perhaps you can write a local composite-action with parameterized name? I think you'd reap the benefit after you decide to update the workflows 2-3 times (for instance to update python-version).

@jonapich
Copy link
Collaborator Author

jonapich commented Feb 1, 2021

I'm quite uncomfortable with the 8 copy pastes. A single update will take 9 times longer to write and will also be longer to review. Moreover, if you add more packages, like coveo-magic, well that's a copy-paste more. We should at least discuss the possibility to use a local action with parameterized name. A typical counterargument against this approach is

Yeah, but what if I want to make .github/workflows/coveo-systools.hml different?

and the counterargument to that counterargument is that, of course, you can. Once the local action is written, you still have the option to use it or not.

Originally I wanted to do composites but it was more problems than not. Is the "local action" à composite? For instance I couldn't call uses: python setup from a composite.

@klalumiere
Copy link
Collaborator

klalumiere commented Feb 2, 2021

Originally I wanted to do composites but it was more problems than not. Is the "local action" à composite? For instance I couldn't call uses: python setup from a composite.

C'est dommage ça. Il y a déjà un issue d'ouvert qui demande qu'on puisse faire ça si tu veux faire +1 🙂.

@klalumiere klalumiere self-requested a review February 2, 2021 15:43
jonapich and others added 6 commits February 2, 2021 13:49
Co-authored-by: Jeff Smith <jfsmith@coveo.com>
Co-authored-by: Kevin Lalumiere <kevin.lalumiere@gmail.com>
@jonapich jonapich merged commit 8293f8f into feature/github-actions Feb 3, 2021
@jonapich jonapich deleted the feature/github-actions-all-projects branch February 3, 2021 19:50
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.

2 participants