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: replace Travis CI with GH Actions #64

Merged
merged 13 commits into from
Aug 1, 2024
Merged

Conversation

psankhe28
Copy link
Contributor

@psankhe28 psankhe28 commented Jul 22, 2024

Description

Added GitHub actions for all drs-filer endpoints.

Fixes # (issue)
#58

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • I have not reduced the existing code coverage
  • I have added docstrings following the Python style guidelines of this project to all new modules, classes, methods and functions are documented with docstrings following; I have updated any previously existing docstrings, if applicable
  • I have updated any sections of the app's documentation that are affected by the proposed changes, if applicable

Summary by Sourcery

This pull request replaces Travis CI with GitHub Actions for continuous integration. It introduces new workflows for building Docker images, running linting and unit tests, and testing API endpoints. Additionally, comprehensive tests for DRS-Filer endpoints have been added.

  • New Features:
    • Added GitHub Actions workflows for building, linting, and testing the project.
  • CI:
    • Replaced Travis CI with GitHub Actions for continuous integration.
    • Configured GitHub Actions to build and publish Docker images on push to 'main' and 'dev' branches.
    • Set up GitHub Actions to run linting and unit tests on multiple Python versions (3.6, 3.7, 3.8).
    • Implemented a GitHub Actions workflow to test DRS-Filer API endpoints using Docker Compose.
  • Tests:
    • Added comprehensive tests for DRS-Filer endpoints, including object creation, retrieval, update, and deletion.

Copy link
Contributor

sourcery-ai bot commented Jul 22, 2024

Reviewer's Guide by Sourcery

This pull request replaces Travis CI with GitHub Actions for continuous integration. It introduces new GitHub Actions workflows for building and publishing Docker images, running lint checks, and executing unit tests. Additionally, it includes a comprehensive test suite for the DRS Filer endpoints.

File-Level Changes

Files Changes
.github/workflows/docker-build-publish-drs-filer.yml
.github/workflows/lint.yml
.github/workflows/test.yml
Introduced new GitHub Actions workflows for building and publishing Docker images, running lint checks, and executing unit tests.

Tips
  • Trigger a new Sourcery review by commenting @sourcery-ai review on the pull request.
  • Continue your discussion with Sourcery by replying directly to review comments.
  • You can change your review settings at any time by accessing your dashboard:
    • Enable or disable the Sourcery-generated pull request summary or reviewer's guide;
    • Change the review language;
  • You can always contact us if you have any questions or feedback.

Copy link
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey @psankhe28 - I've reviewed your changes and found some issues that need to be addressed.

Blocking issues:

  • Remove unused matrix variable. (link)
Here's what I looked at during the review
  • 🔴 General issues: 1 blocking issue
  • 🟢 Security: all looks good
  • 🟡 Testing: 12 issues found
  • 🟢 Complexity: all looks good
  • 🟢 Documentation: all looks good

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment to tell me if it was helpful.

.github/workflows/test.yml Show resolved Hide resolved
.github/workflows/test.yml Outdated Show resolved Hide resolved
tests/test.py Show resolved Hide resolved
tests/test.py Show resolved Hide resolved
tests/test.py Show resolved Hide resolved
tests/test.py Outdated Show resolved Hide resolved
tests/test.py Show resolved Hide resolved
tests/test.py Show resolved Hide resolved
tests/test.py Outdated Show resolved Hide resolved
tests/test.py Outdated Show resolved Hide resolved
@psankhe28 psankhe28 requested a review from uniqueg July 22, 2024 18:50
@uniqueg
Copy link
Member

uniqueg commented Jul 23, 2024

Seems there is an issue with the workflow - apparently it tries to run Python 3.1 (probably should be 3.10). Btw, Py 3.7 is end-of-life, and Py 3.8 is end-of-life in October this year, so I think you can remove those. Moreover, this is a standalone service, not a library, so we won't need to support multiple Python versions. So I think it'd be best to only support (and test) the latest stable version, which is 3.11.

Copy link
Member

@uniqueg uniqueg left a comment

Choose a reason for hiding this comment

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

Please address all open comments, including the Sourcery ones 🙏

.github/workflows/lint.yml Outdated Show resolved Hide resolved
Copy link
Member

@uniqueg uniqueg left a comment

Choose a reason for hiding this comment

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

Okay, last very minor changes :)

.github/workflows/lint.yml Outdated Show resolved Hide resolved
.github/workflows/test.yml Outdated Show resolved Hide resolved
tests/test.py Outdated Show resolved Hide resolved
Copy link
Member

@uniqueg uniqueg left a comment

Choose a reason for hiding this comment

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

Just one tiny thing left :)

tests/test.py Outdated Show resolved Hide resolved
Signed-off-by: Prati28 <[email protected]>
@psankhe28 psankhe28 requested a review from uniqueg July 28, 2024 16:42
@psankhe28 psankhe28 merged commit 194ee78 into dev Aug 1, 2024
5 checks passed
@psankhe28 psankhe28 deleted the feature/github-actions branch August 1, 2024 06:20
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