novuhq / novu-ruby

Ruby SDK for Novu - The open-source notification infrastructure for engineers. 🚀
https://rubygems.org/gems/novu
MIT License
23 stars 10 forks source link

Setup GitHub Workflow for Running Unit Tests #36

Open Cliftonz opened 12 months ago

Cliftonz commented 12 months ago

In order to ensure the stability and reliability of our codebase, it is essential to have automated unit tests running for each push and pull request. Currently, our repository lacks a GitHub Actions workflow to run unit tests, and this needs to be addressed to maintain code quality and catch issues early.

Suggested Solution:

  1. Create a new workflow file in .github/workflows/ directory. Filename: run-unit-tests.yml
  1. Configure the workflow to be triggered on every push and pull_request event to the main branch.
  2. Define job steps: Checkout the repository. Setup the environment/java runtime. Install dependencies. Run the unit tests.
amirali-ashraf commented 11 months ago

@Cliftonz I think I can pick this up if you are still interested. Thanks

amirali-ashraf commented 11 months ago

@muhammadnawzad thanks for picking it.

Do you think we need to add other ruby versions to the set or we are good with only having jruby to test it?

muhammadnawzad commented 11 months ago

Running the tests on multiple versions is definitely more beneficial. Initially, I planned on running the tests on different versions but since the gem pry-debugger-jruby is a dependency. Jruby is the only version that can be used to run the test. I recommend moving pry-debugger-jruby out of the gemfile since this is a development tool and enabling tests on different ruby versions. However I leave the decision to the active contributors.