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

Add CI with Linting and Testing #142

Merged
merged 6 commits into from Feb 3, 2024
Merged

Conversation

rodneyosodo
Copy link
Contributor

@rodneyosodo rodneyosodo commented Feb 3, 2024

  • New Features
    • Introduced Dependabot configuration for automated dependency updates.
    • Set up a CI pipeline for continuous integration, including linting, building, and testing.
  • Enhancements
    • Improved efficiency in asset management and code readability across various modules.
    • Optimized error handling in Docker helper functions and added clarity in command-line tools.
    • Enhanced logic for date range handling and metadata extraction, improving reliability and user experience.
  • Bug Fixes
    • Addressed issues with unnecessary code lines and spacing, enhancing the overall code quality.
    • Fixed inconsistencies in parameter naming and logic flow, ensuring better maintainability.

Signed-off-by: Rodney Osodo 28790446+rodneyosodo@users.noreply.github.com

…a manipulation

Signed-off-by: Rodney Osodo <28790446+rodneyosodo@users.noreply.github.com>
- Added a new file `.github/dependbot.yml` to the codebase.
- The file includes configuration for Dependabot.
- Added settings for two package ecosystems: `github-actions` and `gomod`.
- Both ecosystems are set to be checked on a weekly basis.

Signed-off-by: Rodney Osodo <28790446+rodneyosodo@users.noreply.github.com>
A new file named "ci.yml" has been added to the GitHub repository. This file contains a CI pipeline configuration that enables continuous integration. The pipeline is triggered by pull requests and pushes to the main branch. It runs on an Ubuntu environment and includes several steps such as checking out code, setting up Go, running golangci-lint, and building binaries for different operating systems and architectures. Additionally, the configuration includes build commands for different operating systems and architectures, followed by a test command for running tests with coverage analysis.

Signed-off-by: Rodney Osodo <28790446+rodneyosodo@users.noreply.github.com>
@rodneyosodo rodneyosodo changed the title Refactor codebase for improved functionality, error handling, and dat… Add CI with Linting and Testing Feb 3, 2024
… platforms

Signed-off-by: Rodney Osodo <28790446+rodneyosodo@users.noreply.github.com>
Signed-off-by: Rodney Osodo <28790446+rodneyosodo@users.noreply.github.com>
Removed the errcheck and stylecheck linters from the list of enabled linters in .golangci.yml.

Signed-off-by: Rodney Osodo <28790446+rodneyosodo@users.noreply.github.com>
@simulot
Copy link
Owner

simulot commented Feb 3, 2024

Thanks for this PR.
I'm reading documentions on CI. This is new for me

Copy link
Owner

@simulot simulot left a comment

Choose a reason for hiding this comment

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

Is it a way to create a release with the binaries?

@rodneyosodo
Copy link
Contributor Author

I thought goreleaser does this by default. This is something similar to how you have attached the binaries to the latest release: https://github.com/simulot/immich-go/releases/tag/0.10.0 . On the CI, I just added the compile check, i.e. everything pushed to the main needs to compile for the different platforms.

@simulot
Copy link
Owner

simulot commented Feb 3, 2024

Yes, goreleaser does that. I'm wondering if it's possible delegate the binaries build to the CI.

Fine, let's merge the PR.
Thanks for your work

@simulot simulot merged commit c3907ec into simulot:main Feb 3, 2024
@rodneyosodo
Copy link
Contributor Author

You meant something like this https://github.com/goreleaser/goreleaser/blob/main/.github/workflows/release.yml

When you push, let's say tag v0.11.0, it should kick off ci and generate a release either as a draft before you approve to an actual release

@rodneyosodo rodneyosodo deleted the golangcilint branch February 3, 2024 19:36
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