67
edits
(Describe current testing and deployment processes) |
(Fix code blocks) |
||
Line 33: | Line 33: | ||
The '''Tables Renderer''' is still in planning, and the project has not started. A prototype renderer is implemented in KumaScript, in the [https://developer.mozilla.org/en-US/docs/Template:EmbedCompatTable EmbedCompatTable macro]. | The '''Tables Renderer''' is still in planning, and the project has not started. A prototype renderer is implemented in KumaScript, in the [https://developer.mozilla.org/en-US/docs/Template:EmbedCompatTable EmbedCompatTable macro]. | ||
Local accounts are used for '''Authentication'''. For development, it is easiest to create local Django accounts backed by username and password. | Local accounts are used for '''Authentication'''. For development, it is easiest to create local Django accounts backed by username and password. <code>./manage.py createsuperuser</code> can be used to create a superuser account with access to the Django admin. | ||
The '''API documentation''' is hosted at [https://browsercompat.readthedocs.org/en/latest/index.html browsercompat.readthedoc.org], and sourced in the [https://github.com/mdn/browsercompat mdn/browsercompat project]. Documentation developers will need to install the Data API to build documents locally, but won't need to populate it with compatibility data. | The '''API documentation''' is hosted at [https://browsercompat.readthedocs.org/en/latest/index.html browsercompat.readthedoc.org], and sourced in the [https://github.com/mdn/browsercompat mdn/browsercompat project]. Documentation developers will need to install the Data API to build documents locally, but won't need to populate it with compatibility data. | ||
Line 40: | Line 40: | ||
'''MDN''' is a mature product, with many layers of testing: | '''MDN''' is a mature product, with many layers of testing: | ||
* Developers can run unit tests against their own code ( | * Developers can run unit tests against their own code (<code>./manage.py test</code>) | ||
* Pull Requests are tested in [https://travis-ci.org/mozilla/kuma TravisCI] | * Pull Requests are tested in [https://travis-ci.org/mozilla/kuma TravisCI] | ||
* Each pull request is reviewed by another developer using [https://github.com/mozilla/kuma/pulls GitHub's PR interface]. | * Each pull request is reviewed by another developer using [https://github.com/mozilla/kuma/pulls GitHub's PR interface]. | ||
Line 50: | Line 50: | ||
A [https://github.com/mdn/browsercompat single codebase] is used for the '''Data API''', '''Data Explorer''', '''Importer''', and '''API Documentation'''. This project includes testing: | A [https://github.com/mdn/browsercompat single codebase] is used for the '''Data API''', '''Data Explorer''', '''Importer''', and '''API Documentation'''. This project includes testing: | ||
* Developers can run | * Developers can run <code>make test</code> to run Django unit tests, and <code>make qa</code> to run code linters and coverage tests as well. | ||
* Developers can run | * Developers can run <code>make test-integration</code> to run a local API instance, load it with sample data, and make API requests. | ||
* Pull requests are tested in [https://travis-ci.org/mdn/browsercompat TravisCI]. This runs unit, QA, and integration tests. | * Pull requests are tested in [https://travis-ci.org/mdn/browsercompat TravisCI]. This runs unit, QA, and integration tests. | ||
* ''Some'' pull requests are code reviewed by other developers, because 1) the API does not include personally identifiable information, 2) the service is not in production use outside of some beta testers, and 3) no other developers are currently familiar with the code. | * ''Some'' pull requests are code reviewed by other developers, because 1) the API does not include personally identifiable information, 2) the service is not in production use outside of some beta testers, and 3) no other developers are currently familiar with the code. | ||
Line 59: | Line 59: | ||
* When testing is successful, the code is automatically deployed to https://browsercompat.herokuapp.com | * When testing is successful, the code is automatically deployed to https://browsercompat.herokuapp.com | ||
Heroku hosts the ''BrowserCompat DB'' and the ''Importer DB'' in a single [https://aws.amazon.com/rds/postgresql/ RDS PostgreSQL database]. When the data schema changes, database migrations are run using the command-line heroku client ( | Heroku hosts the ''BrowserCompat DB'' and the ''Importer DB'' in a single [https://aws.amazon.com/rds/postgresql/ RDS PostgreSQL database]. When the data schema changes, database migrations are run using the command-line heroku client (<code>heroku run --app browsercompat ./manage.py migrate</code>) | ||
The '''C&M GUI''' is in early development. Developers can run tests with | The '''C&M GUI''' is in early development. Developers can run tests with <code>ember test</code>, but 100% success is not yet expected. No tests are automatically run on push. | ||
'''Authentication''' is done against https://browsercompat.herokuapp.com, and is not specifically tested. Firefox Accounts was integrated, but has since [https://bugzilla.mozilla.org/show_bug.cgi?id=1229037 broken]. | '''Authentication''' is done against https://browsercompat.herokuapp.com, and is not specifically tested. Firefox Accounts was integrated, but has since [https://bugzilla.mozilla.org/show_bug.cgi?id=1229037 broken]. | ||
The KumaScript-based '''table renderer''' is manually tested, and requires manually refreshing MDN pages when data changes. Stephanie Hobson has a [https://developer.mozilla.org/en-US/docs/User:stephaniehobson:compat test page] linking to interesting pages. | The KumaScript-based '''table renderer''' is manually tested, and requires manually refreshing MDN pages when data changes. Stephanie Hobson has a [https://developer.mozilla.org/en-US/docs/User:stephaniehobson:compat test page] linking to interesting pages. |
edits