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

ci: Add integration and deployment pipelines #26

Merged
merged 1 commit into from
Jan 22, 2024

Conversation

georgkrause
Copy link
Collaborator

This adds some automation to the project.

In order to make this work, we would need to setup a Trusted Publisher on Pypi for the project. The documentation is here: https://docs.pypi.org/trusted-publishers/

  • Our current pytest version doesn't support python > 3.9, which is why tests are not run there yet. I can file another PR after this is merged
  • Linting throws a bunch of things that require fixing, I suggest to handle this in a following PR, too.

@georgkrause georgkrause mentioned this pull request Jan 9, 2024
Copy link
Member

@phw phw left a comment

Choose a reason for hiding this comment

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

This looks good an should work once the pavkage on PyPI is properly configured.

runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8", "3.9"] #, "3.10", "3.11", "3.12"]
Copy link
Member

Choose a reason for hiding this comment

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

Are there issues with 3.10 and later or why are those disabled here?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I quote the PR description:

Our current pytest version doesn't support python > 3.9, which is why tests are not run there yet. I can file another PR after this is merged

- name: Install
run: pip install .[tests]
- name: Run tests
run: pytest --junitxml=junit/test-results.xml --cov=com --cov-report=xml --cov-report=html
Copy link
Member

Choose a reason for hiding this comment

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

Is it useful to generate the coverage report if that is not used?

What about uploading the report HTML and maybe XML as a build artifact? That way it could be inspected at least.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

No its not. I just copied the command I ran locally, didn't figured out yet how to store the artifacts. I am going to dig into this now, thank you for the reminder!

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I think I configured it to post comments to the PRs, however this is hard to test :/

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I created a test case in my own repo by merging this and filing a new PR: georgkrause#2

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The display is a little bit confusing because tests are part of the package and the display doesn't add categories for the different python versions.

Copy link
Member

Choose a reason for hiding this comment

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

I see. But I think that would be fine that's something that can be improved, and if something shows up there one can always start looking into the actual artifacts as well.

I assume the reason why the actions haven't been run here is because they need someone with write access (I don't) to trigger the run, right? Or maybe actions have to be enabled in the repo settings first.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I do think its about enabling in the settings, but I am not an expert. Maybe it needs to go in the default branch first?

@georgkrause georgkrause force-pushed the cicd branch 15 times, most recently from de6129e to a3af56e Compare January 10, 2024 11:07
Copy link
Member

@mayhem mayhem left a comment

Choose a reason for hiding this comment

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

Thanks!

@mayhem mayhem merged commit 8f3be52 into metabrainz:master Jan 22, 2024
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.

3 participants