Skip to content

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

Open
ravjot07 wants to merge 1 commit intoveraison:masterfrom
ravjot07:ci_test
Open

feat: Add CI workflow to run unit tests on each commit#10
ravjot07 wants to merge 1 commit intoveraison:masterfrom
ravjot07:ci_test

Conversation

@ravjot07
Copy link
Copy Markdown

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

Signed-off-by: Ravjot Singh <ravu2004@gmail.com>
@ravjot07
Copy link
Copy Markdown
Author

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

@ravjot07
Copy link
Copy Markdown
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
Copy Markdown
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