* Move frontend doc [ci skip] * Fix DEV styling [ci skip] * Update table of contents [ci skip] * Move stuffs around [ci skip] * Move stuffs around [ci skip] * Add gitdocs integration * Mess with title again [ci-skip] * Add root readme back in * Update docs/readme as a new readme * Messing with title again * Add where to get help [ci skip] * Fix dev connect link [ci skip] * Move how to get help [ci skip] * Add TODO to empty headers * Add more TODOs and clean up a link * Add sloan * Update prereqs to specify we use macOS * Add gitdocs build to test on Netlify * Update README [ci skip] * Add .gitdocs_build/ to .gitignore [ci skip] * Create netlify.toml * Update docs with logo and more docs * Update gitdocs name * Add redirects for netlify * Remove extraneous redirects from netlify * Add more README TODOs [ci skip] * Update root directory of gitdocs * Move ISSUE_TEMPLATE to .github/ [ci skip] * Testing new base for netlify * Update README [ci skip] * Rename index.md to readme.md for GitHub * Move gitdocs.json to docs folder * Add GPL LICENSE [ci skip] * tweak readme * update license language * Update FAQ with some Q and A * Add some traffic control for docs readme * add license faq and core team members * Add new line to fix list * Add AGPL-3 Adding the GNU AFFERO GENERAL PUBLIC LICENSE. * Update GPL License * Additional documentation for PostgreSQL setup
2.3 KiB
Testing
We use the following testing tools:
- RSpec for testing the backend
- Capybara with selenium-webdriver for view testing
- chromedriver-helper for standard JS testing
- guard-rspec for automated testing
- Jest for testing in the front-end
- SimpleCov for tracking overall test coverage
Each pull request should come with tests related to the newly written feature or bug fix. Ideally, we should test both the front end and back end.
If you'd like to help us improve our test coverage, we recommend checking out our total coverage and writing tests for selected files based on SimpleCov's (more below) test coverage results.
If you're new to writing tests in general or with Rails, we recommend reading about testing with Rails, RSpec, and Capybara first. For Webpack and
How to Use SimpleCov
- Run
bundle exec rspec specorbin/rspec spec. You can run RSpec on the whole project or a single file. - After rspec is complete, open
index.htmlwithin the coverage folder to view code coverages.
You can also run bin/rspecov to run bin/rspec spec
CodeClimate
We are using CodeClimate to track code quality and code coverage. Codeclimate will grade the quality of the code of every PR but not the entirety of the project. If you feel that the current linting rule is unreasonable, feel free to submit a separate PR to change it. Fix any errors that CodeClimate provides and strive to leave code better than you found it.
Travis will upload Simplecov data to CodeClimate. We are still in the early stage of using it so it may not provide an accurate measurement our of codebase.
Skipping CI build (Not recommended)
If your changes are minor (i.e. updating README, fixing a typo), you can skip CI by adding [skip ci] to your commit message.
Continuous Integration & Continuous Deployment
We are using Travis for CI and CD. Travis will run a build (in isolated environment for testing) for every push to this repository. Keep in mind that a passing-build does not necessarily mean the project won't run into any issues. Strive to write good tests for any chunk of code you wish to contribute. Travis will deploy a pull request to production after CI passes. Our test suite is not perfect and sometimes a re-rerun is needed.