forked from oppia/oppia
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5 from oppia/develop
Merge changes from oppia
- Loading branch information
Showing
3,586 changed files
with
496,613 additions
and
170,160 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,147 @@ | ||
workflows: | ||
version: 2 | ||
circleci_tests: | ||
jobs: | ||
- setup | ||
- lint_tests: | ||
requires: | ||
- setup | ||
- typescript_tests: | ||
requires: | ||
- setup | ||
- frontend_tests: | ||
requires: | ||
- setup | ||
- backend_tests: | ||
requires: | ||
- setup | ||
|
||
var_for_docker_image: &docker_image circleci/python:2.7.14-jessie-browsers | ||
|
||
anchor_for_job_defaults: &job_defaults | ||
working_directory: /home/circleci/oppia | ||
# Its okay to hardcode the CC_TEST_REPORTER_ID as the only risk in doing so is | ||
# when someone uses this test coverage ID to post incorrect coverage data. | ||
# This generally does not occur and if it happens, it would be replaced with | ||
# data from subsequent coverage payloads. See this comment for more | ||
# information: https://github.com/oppia/oppia/pull/7067#issuecomment-508822501 | ||
environment: | ||
CC_TEST_REPORTER_ID: 561968e2f03d3bb4f1aed69dc94174c2e3b9dc82cf1f8ad31fc799f8c67afc6e | ||
docker: | ||
- image: *docker_image | ||
|
||
anchor_for_installing_dependencies: &install_dependencies | ||
name: Install dependencies | ||
command: | | ||
python -m scripts.install_third_party_libs | ||
anchor_for_installing_cc_test_reporter: &install_cc | ||
name: Install codeclimate test reporter | ||
command: | | ||
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter | ||
chmod +x ./cc-test-reporter | ||
./cc-test-reporter before-build | ||
anchor_for_restoring_cache: &restore_cache | ||
keys: | ||
- setup-files-cache-{{ checksum "date" }} | ||
- third-party-cache-{{ checksum "date" }} | ||
|
||
version: 2 | ||
jobs: | ||
setup: | ||
<<: *job_defaults | ||
steps: | ||
- checkout | ||
- run: date +%F > date | ||
- restore_cache: | ||
<<: *restore_cache | ||
- run: | ||
<<: *install_dependencies | ||
- save_cache: | ||
key: setup-files-cache-{{ checksum "date" }} | ||
paths: | ||
- node_modules/ | ||
- ../oppia_tools/ | ||
|
||
lint_tests: | ||
<<: *job_defaults | ||
steps: | ||
- checkout | ||
- run: | ||
<<: *install_dependencies | ||
- run: | ||
name: Run lint tests | ||
# All the python scripts should behave as modules. Files like the | ||
# pre_commit_linter and third_party_size_check need to import other | ||
# Python files and that is only possible if we treat it as a module. | ||
command: | | ||
python -m scripts.third_party_size_check | ||
python -m scripts.pre_commit_linter --path=. --verbose | ||
typescript_tests: | ||
<<: *job_defaults | ||
steps: | ||
- checkout | ||
- run: | ||
<<: *install_dependencies | ||
- run: date +%F > date | ||
- restore_cache: | ||
<<: *restore_cache | ||
- run: | ||
name: Run typescript tests | ||
command: | | ||
python -m scripts.typescript_checks | ||
frontend_tests: | ||
<<: *job_defaults | ||
steps: | ||
- checkout | ||
- run: | ||
<<: *install_dependencies | ||
- run: date +%F > date | ||
- restore_cache: | ||
<<: *restore_cache | ||
- run: | ||
name: Run frontend tests | ||
command: | | ||
python -m scripts.run_frontend_tests --run_minified_tests --skip_install | ||
- run: | ||
name: Generate frontend coverage report | ||
command: | | ||
sudo pip install codecov | ||
codecov --file ../karma_coverage_reports/lcov.info -F frontend | ||
when: on_success | ||
|
||
backend_tests: | ||
<<: *job_defaults | ||
steps: | ||
- checkout | ||
- run: | ||
<<: *install_dependencies | ||
- run: date +%F > date | ||
- restore_cache: | ||
<<: *restore_cache | ||
- run: sudo pip install webtest | ||
- run: sudo pip install coverage | ||
- run: | ||
name: Run backend tests | ||
command: | | ||
python -m scripts.run_backend_tests --generate_coverage_report --exclude_load_tests | ||
- run: | ||
<<: *install_cc | ||
- run: | ||
name: Generate backend coverage report | ||
command: | | ||
sudo pip install codecov | ||
codecov -F backend | ||
./cc-test-reporter format-coverage -t coverage.py coverage.xml | ||
./cc-test-reporter sum-coverage coverage/codeclimate.json | ||
./cc-test-reporter upload-coverage | ||
when: on_success | ||
|
||
notify: | ||
webhooks: | ||
# A list of hook hashes, containing the url field | ||
# gitter hook | ||
- url: https://webhooks.gitter.im/e/71ac71505d1d45161035 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# .coveragerc to control coverage.py | ||
[run] | ||
omit = | ||
*/oppia_tools/* | ||
*/third_party/* | ||
*/usr/* | ||
*_test.py | ||
*core/tests/* | ||
*__init__.py | ||
# TODO(#7419): Remove python_utils from the list once the codebase is | ||
# run under Python 3. | ||
python_utils.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.