diff --git a/.circleci/config.yml b/.circleci/config.yml index f8b3c6ab7e..69515749e0 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -30,7 +30,7 @@ aliases: sudo apt-get update sudo apt-get install -y moreutils rm -f /home/circleci/.gitconfig - mispipe "tools/travis/setup-backend" ts + mispipe "tools/ci/setup-backend" ts # Note: CircleCI doesn't support any sort of basic variable # substitution, so we have to do this `_dist.txt` hack where we @@ -55,14 +55,14 @@ aliases: name: run backend tests command: | . /srv/zulip-py3-venv/bin/activate - mispipe ./tools/travis/backend ts + mispipe ./tools/ci/backend ts - &run_frontend_tests run: name: run frontend tests command: | . /srv/zulip-py3-venv/bin/activate - mispipe ./tools/travis/frontend ts + mispipe ./tools/ci/frontend ts - &upload_coverage_report run: @@ -103,7 +103,7 @@ jobs: rm -f /home/circleci/.gitconfig # This is the main setup job for the test suite - mispipe "tools/travis/setup-backend" ts + mispipe "tools/ci/setup-backend" ts # Cleaning caches is mostly unnecessary in Circle, because # most builds don't get to write to the cache. diff --git a/.travis.yml b/.travis.yml index be15046e7a..3d5e339523 100644 --- a/.travis.yml +++ b/.travis.yml @@ -15,7 +15,7 @@ install: - mispipe "pip install codecov" ts || mispipe "pip install codecov" ts # This is the main setup job for the test suite - - mispipe "tools/travis/setup-$TEST_SUITE" ts + - mispipe "tools/ci/setup-$TEST_SUITE" ts # Clean any caches that are not in use to avoid our cache # becoming huge. @@ -26,7 +26,7 @@ script: # broken running their system puppet with Ruby. See # https://travis-ci.org/zulip/zulip/jobs/240120991 for an example traceback. - unset GEM_PATH - - mispipe "./tools/travis/$TEST_SUITE" ts + - mispipe "./tools/ci/$TEST_SUITE" ts cache: yarn: true apt: false diff --git a/docs/overview/directory-structure.md b/docs/overview/directory-structure.md index 61205e307c..af9343d306 100644 --- a/docs/overview/directory-structure.md +++ b/docs/overview/directory-structure.md @@ -113,8 +113,8 @@ Django context (i.e. with database access). * `tools/setup/` Subdirectory of `tools/` for things only used during the development environment setup process. -* `tools/travis/` Subdirectory of `tools/` for things only used to - setup and run our tests in Travis CI. Actual test suites should +* `tools/ci/` Subdirectory of `tools/` for things only used to + setup and run our tests in CI. Actual test suites should go in `tools/`. --------------------------------------------------------- diff --git a/docs/testing/travis.md b/docs/testing/travis.md index e67d246121..422cc02257 100644 --- a/docs/testing/travis.md +++ b/docs/testing/travis.md @@ -29,14 +29,14 @@ The specific test suites we have are listed in the `matrix` section, which has a matrix of Python versions and test suites (`$TEST_SUITE`). We've configured it to use a few helper scripts for each job: -* `tools/travis/setup-$TEST_SUITE`: The script that sets up the test +* `tools/ci/setup-$TEST_SUITE`: The script that sets up the test environment for that suite (E.g., installing dependencies). * For the backend and frontend suites, this is a thin wrapper around `tools/provision`, aka the development environment provision script. * For the production suite, this is a more complicated process because of all the packages Travis installs. See the comments in - `tools/travis/setup-production` for details. -* `tools/travis/$TEST_SUITE`: The script that runs the actual test + `tools/ci/setup-production` for details. +* `tools/ci/$TEST_SUITE`: The script that runs the actual test suite. The main purpose of the distinction between the two is that if the @@ -111,6 +111,6 @@ build workers (e.g. several copies of Postgres, Java, MySQL, etc.). In order to make Zulip's tests performance reasonably well, we uninstall (or mark with `apt-mark hold`) many of these dependencies that are irrelevant to Zulip in -[`tools/travis/setup-production`][setup-production]. +[`tools/ci/setup-production`][setup-production]. -[setup-production]: https://github.com/zulip/zulip/blob/master/tools/travis/setup-production +[setup-production]: https://github.com/zulip/zulip/blob/master/tools/ci/setup-production diff --git a/tools/travis/activate-venv b/tools/ci/activate-venv similarity index 100% rename from tools/travis/activate-venv rename to tools/ci/activate-venv diff --git a/tools/travis/backend b/tools/ci/backend similarity index 96% rename from tools/travis/backend rename to tools/ci/backend index 50d6283f11..35e24295be 100755 --- a/tools/travis/backend +++ b/tools/ci/backend @@ -1,6 +1,6 @@ #!/bin/bash -source tools/travis/activate-venv +source tools/ci/activate-venv echo "Test suite is running under $(python --version)." set -e diff --git a/tools/travis/frontend b/tools/ci/frontend similarity index 94% rename from tools/travis/frontend rename to tools/ci/frontend index 5d0c2782d1..b065111cb0 100755 --- a/tools/travis/frontend +++ b/tools/ci/frontend @@ -1,6 +1,6 @@ #!/bin/bash -source tools/travis/activate-venv +source tools/ci/activate-venv set -e set -x diff --git a/tools/ci/production b/tools/ci/production new file mode 100755 index 0000000000..08a688bfd1 --- /dev/null +++ b/tools/ci/production @@ -0,0 +1,5 @@ +#!/bin/bash +set -e +set -x + +sudo ./tools/ci/production-helper diff --git a/tools/travis/production-helper b/tools/ci/production-helper similarity index 98% rename from tools/travis/production-helper rename to tools/ci/production-helper index 0a7ad1634b..4bcd55bf94 100755 --- a/tools/travis/production-helper +++ b/tools/ci/production-helper @@ -72,7 +72,7 @@ sed -i 's|Length: [0-9]\+\( [(][0-9]\+[.][0-9]K[)]\)\?|Length: |' ~/succ if ! diff -ur /tmp/http-headers-processed ~/success-http-headers.txt; then set +x echo - echo "FAILURE: The HTTP Headers returned from loading the homepage on the server do not match the contents of tools/travis/success-http-headers.txt. Typically, this means that the server threw a 500 when trying to load the homepage." + echo "FAILURE: The HTTP Headers returned from loading the homepage on the server do not match the contents of tools/ci/success-http-headers.txt. Typically, this means that the server threw a 500 when trying to load the homepage." echo "Displaying the contents of the server's error log:" echo cat /var/log/zulip/errors.log diff --git a/tools/travis/setup-backend b/tools/ci/setup-backend similarity index 100% rename from tools/travis/setup-backend rename to tools/ci/setup-backend diff --git a/tools/travis/setup-frontend b/tools/ci/setup-frontend similarity index 100% rename from tools/travis/setup-frontend rename to tools/ci/setup-frontend diff --git a/tools/travis/setup-production b/tools/ci/setup-production similarity index 97% rename from tools/travis/setup-production rename to tools/ci/setup-production index 92d01d4520..c595a2f248 100755 --- a/tools/travis/setup-production +++ b/tools/ci/setup-production @@ -32,8 +32,8 @@ if ! tools/provision --production-travis; then tools/provision --production-travis fi -cp -a tools/travis/success-http-headers.txt ~/ -source tools/travis/activate-venv +cp -a tools/ci/success-http-headers.txt ~/ +source tools/ci/activate-venv # Force OpenJDK 8 JRE. This is a workaround for Travis CI having # broken their java install, but also nicely provides consistency. diff --git a/tools/travis/success-http-headers.txt b/tools/ci/success-http-headers.txt similarity index 100% rename from tools/travis/success-http-headers.txt rename to tools/ci/success-http-headers.txt diff --git a/tools/linter_lib/custom_check.py b/tools/linter_lib/custom_check.py index 07e1e3ac6f..d02ba0ba2b 100644 --- a/tools/linter_lib/custom_check.py +++ b/tools/linter_lib/custom_check.py @@ -239,7 +239,7 @@ def build_custom_checkers(by_lang): }, {'pattern': '\t', 'strip': '\n', - 'exclude': set(['tools/travis/success-http-headers.txt']), + 'exclude': set(['tools/ci/success-http-headers.txt']), 'description': 'Fix tab-based whitespace'}, ] # type: RuleList comma_whitespace_rule = [ diff --git a/tools/test-all b/tools/test-all index e725886e8e..c587e70126 100755 --- a/tools/test-all +++ b/tools/test-all @@ -38,7 +38,7 @@ function run { run ./tools/check-provision $FORCEARG run ./tools/clean-repo -# travis/backend +# ci/backend run ./tools/lint --backend $FORCEARG run ./tools/test-tools run ./tools/test-backend $FORCEARG @@ -57,7 +57,7 @@ run ./tools/test-api # Not running queue worker reload tests since it's low-churn code # run ./tools/test-queue-worker-reload -# travis/frontend +# ci/frontend run ./tools/lint --frontend $FORCEARG run ./tools/test-js-with-node run ./manage.py makemessages --locale en diff --git a/tools/travis/production b/tools/travis/production deleted file mode 100755 index 506bb5e3ce..0000000000 --- a/tools/travis/production +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash -set -e -set -x - -sudo ./tools/travis/production-helper