Skip to content

Latest commit

 

History

History
106 lines (61 loc) · 6.45 KB

CONTRIBUTING.md

File metadata and controls

106 lines (61 loc) · 6.45 KB

Contributing to Violet Rails

Developer environment setup

Getting started is easy as installing docker and then following the steps here: https://github.com/restarone/violet_rails/wiki/Getting-started-(development-cheatsheet)

Grab your own copy

Fork the repository and work on your feature!

Open a pull request

Open a pull request targeting restarone/violet_rails:master example: #1461

How is working on Violet Rails different?

We like to think that Violet Rails has the best development experience in the space of open source web frameworks. We work constantly towards that goal and welcome feedback. To give you the best development experience, we have made it easy for you to see and play with your changes and visualize how it impacts the system as a whole. This means right after opening your PR you have the ability to:

  • deploy a live instance,
  • view how your code impacts the rest of the code base and,
  • see how fast it runs (with graphs and other visual goodies)

These are tools we use to great effect, and they are available to you.

Launch Review app 🌐

To launch a review app, open a PR on this repository and add the deploy-review-app label:

Screen Shot 2023-04-06 at 6 18 31 PM

This will trigger a Github Action that will launch an isolated environment for you to test your changes. The action will add a link to the app in a comment as well:

Screen Shot 2023-04-06 at 6 20 11 PM

View Test coverage report 📋

The test coverage report is generated when the test suite completes running (both in Github Actions and Locally). You can view it by clicking on "Details" next to the Ruby test jobs in Github Actions Screen Shot 2023-04-06 at 6 22 15 PM

and then clicking on Summary,

Screen Shot 2023-04-06 at 6 23 34 PM

and downloading and opening the index.html file with your browser:

Screen Shot 2023-04-06 at 6 24 26 PM

🎉 test coverage is a static HTML web page! Screen Shot 2023-04-06 at 6 24 45 PM

Want to generate the Test coverage report locally?

Run any of the test commands to completion and you will see a report generated: https://github.com/restarone/violet_rails/wiki/Getting-started-(development-cheatsheet)#test-commands

Enable profiling ⏱️

It should be easy to find performance bottlenecks and inefficient code. To enable profiling, ensure that your user has the profiling privilege (reserved for system owners and admins):

Screen Shot 2023-04-06 at 6 26 23 PM

and it should show in development, staging AND production (like shown below) 💯

Screen Shot 2023-04-06 at 6 27 04 PM

Pull Request Checklist

1. Required CI tests are passing ✔️

Your code cannot be merged if it breaks existing functionality Screen Shot 2023-03-28 at 6 35 00 AM

2. Description references the issue

Description references the issue the PR aims to fix. Includes a demo video if its a new feature or bug fix Screen Shot 2023-03-28 at 6 37 03 AM

3. Includes tests

Any new code paths added should be exercised with tests Screen Shot 2023-03-28 at 6 41 26 AM

4. Ready to merge

Merge conflicts should be resolved and the branch should be up-to-date with master Screen Shot 2023-03-28 at 6 50 34 AM

Troubleshooting common dev issues

Got failing tests?

Tests can sometimes be flaky. If you see a failure unrelated to your changes, dont fret! You can re-run CI at a push of a button. To re-run any CI job, click on details, Screen Shot 2023-04-01 at 8 37 37 AM

and hit re-run:

Screen Shot 2023-04-01 at 8 38 13 AM

Review app didnt launch?

You can launch a review app for your PR to evaluate your changes on a live production environment (isolated to you of course). Sometimes the CD job that handles deployment fails. To re-run it, select it from Github Actions and click on re-run

Screen Shot 2023-04-01 at 8 38 49 AM

Code standards

Changes should include automated tests, Restarone Solutions Inc. reserves the right to deny any code change that may risk production Violet Rails applications.

Testing and deployment

Once your pull request has a matching base branch on this repository, automated tests will run. If the automated tests are passing, we will launch a review app (which is a one-off ephemeral environment for testing your change in isolation) and evaluate the difference. If the change looks good on the review app, the change will be included in a release candidate which will be deployed to restarone.solutions for internal testing. Once internal testing and monitoring is complete, it will be merged to master.