ruby version 3.0
- run
bundle installto install all dependencies - run
rails serverin the terminal. Be sure you are in the root app directory. - open a brower and visit "localhost"
If the app fails to compile, you may need to install webpacker.
- run
bundlewhile in the applications root directory - run
rails webpacker:install - run
rails webpacker:compile - Finally, run
rails server
To initialize the database
- run
rails db:migrate
- cd to the root directory of the app project
- be sure you have run
bundle install - run
rspec spec/models/tests.rbto run the applications test
You can add your own test in the test.rb file.
There are several CI tests already created through Github actions for this application.
This action runs everytime a pull request is made by the main branch. These automated tests can be found .github/workflows/ci.yml
You can view the workflow that runs these tests under the Github actions tab.
If you need to create more tests, create a workflow under Actions and save the file under .github/workflows. This action will run test cases on the new code to ensure no previously working test cases have been broken.
If your new code does not pass test cases, then you will need to fix the bugs and resubmit the pull request.
- Setup a pipeline on Heroku
- Connect it to this GitHub repository
- In the settings on the Heroku pipeline, turn on automatic deployments
- When a pull request is accepted, the app will automatically build on the pipeline
- If it is the first Heroku build, you will need to open the bash and run
rails db:migrate