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

feat: Add CI workflow to run unit tests on each commit #10

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ravjot07
Copy link

Issue:
Currently, there is no CI test setup to execute unit tests for every new commit in the repository.

Solution:
Implemented a GitHub Actions workflow named CI that triggers on pushes and pull requests to the master branch. The workflow includes the following steps:

  1. Checkout Repository: Uses actions/checkout@v3 to clone the repository.
  2. Set Up Go Environment: Sets up Go environment using actions/setup-go@v4.
  3. Cache Go Modules: Caches Go build and module directories to speed up subsequent builds using actions/cache@v3.
  4. Install Dependencies: Runs go mod tidy and go mod download to install project dependencies.
  5. Install Tools: Installs evcli and cocli using go install.
  6. Verify Installations: Checks the installed versions of evcli and cocli to ensure they are correctly installed.
  7. Build Project: Compiles the project using go build -v ./....
  8. Run Unit Tests: Executes unit tests with coverage using go test ./... -v -cover.

This CI setup ensures that unit tests are automatically executed on every new commit, enhancing code quality and reliability.

Resolves: #7

@ravjot07
Copy link
Author

@thomas-fossati @setrofim, could you please review this PR and let me know if any changes are needed? Thanks!

@ravjot07
Copy link
Author

ravjot07 commented Jan 7, 2025

@thomas-fossati @setrofim, could you please review this PR and let me know if any changes are needed? Thanks!

@thomas-fossati can i get a review on this one....

Copy link
Contributor

@thomas-fossati thomas-fossati left a comment

Choose a reason for hiding this comment

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

Thanks, @ravjot07 ! LGMT

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