Commit Graph
25 Commits
Author SHA1 Message Date
Alan Guo Xiang TanandGitHub 6fe88e7282 DEV: Fix typo in docker_test.rb script (#23456)
Follow up to b78c44f20b
2023-09-07 15:36:27 +08:00
Alan Guo Xiang TanandGitHub b78c44f20b DEV: Add docker:test:setup Rake task (#23430)
## What is the context here?

The `docker.rake` Rakefile contains Rake tasks that are meant to be run
in the `discourse/discourse_test:release` Docker image. For example, we
have the `docker:test` Rake task that makes it easier to run the test
suite for a particular Discourse commit.

Why are we introducing a `docker:test:setup` Rake task?

While we have the `docker:test` Rake task, it is very limited in the
test commands that can be executed. It is very useful for automated
testing but not very useful for running tests in the development
environment. Therefore, we are introducing a `docker:test:setup` rake
task that can be used to set up the test environment for running tests.

The envisioned example usage is something like this:

```
docker run -d --name=discourse_test --entrypoint=/sbin/boot discourse/discourse_test:release
docker exec -u discourse:discourse discourse_test ruby script/docker_test.rb --no-tests
docker exec -u discourse:discourse discourse_test bundle exec rake docker:test:setup
docker exec -u discourse:discourse discourse_test bundle exec rspec <path to file>
```
2023-09-07 13:46:23 +08:00
David TaylorandGitHub 951abc7504 DEV: Update docker_test to checkout specific branch by default (#20684)
Previously, FETCH_HEAD would always point to tests-passed because our base docker image was configured to only fetch the tests-passed branch. Since https://github.com/discourse/discourse_docker/commit/53bbacc882, we switched to a partial clone which means that `git fetch; git checkout FETCH_HEAD` will checkout whichever remote branch is the first alphabetically. This commit makes the checkout more specific to avoid this issue.
2023-03-15 10:54:47 +00:00
David Taylor b7c21ceb26 DEV: Apply syntax_tree formatting to script/* 2023-01-09 11:13:22 +00:00
Jarek RadoszandGitHub a4c675becd DEV: Remove the remaining Travis code (#13255)
The second attempt at #10041 now that all our plugins use GitHub Actions CI instead.
2021-06-02 20:29:47 +02:00
Jarek Radosz 8cc54c768b Revert "DEV: Remove the remaining ENV["TRAVIS"] usage (#10041)"
This reverts commit 5697647e3b.

See https://review.discourse.org/t/dev-remove-the-remaining-env-travis-usage-10041/12737/4?u=cvx
2020-06-16 19:42:00 +02:00
Jarek RadoszandGitHub 5697647e3b DEV: Remove the remaining ENV["TRAVIS"] usage (#10041) 2020-06-16 17:41:15 +02:00
Jarek RadoszandGitHub 027ee08c67 DEV: Do less work in docker_test (#9470)
* DEV: Update the working tree just once.

`git pull` was effectively doing `git fetch` and `git merge FETCH_HEAD`, and only then we were checking out the desired branch/commit. This change will skip the the merge step.

* DEV: Don't run lefthook in docker_test
2020-04-21 03:48:58 +02:00
romanrizzi b4094378d8 DEV: Move warmup inside docker rake task 2019-10-25 16:31:05 -03:00
romanrizzi 6186683e27 DEV: Add variable to warmup tmp folder and obtain accurate results when profiling specs 2019-10-25 10:52:23 -03:00
Joffrey JAFFEUXandGitHub 1939094a27 datetime is not available at this point (#7630) 2019-05-29 14:06:32 +02:00
Joffrey JAFFEUXandGitHub c11cdea55a DEV: do not use STDERR to print tests timestamps (#7629) 2019-05-29 13:28:02 +02:00
Joffrey JAFFEUXandGitHub 1b50feb93d DEV: adds time logging to docker_test script (#7627) 2019-05-29 12:06:43 +02:00
Sam SaffronandGuo Xiang Tan 5fbcc5cb35 DEV: enable frozen string literal on all files
This reduces chances of errors where consumers of strings mutate inputs
and reduces memory usage of the app.

Test suite passes now, but there may be some stuff left, so we will run
a few sites on a branch prior to merging
2019-05-13 09:31:32 +08:00
Penar Musaraj f55820c5b4 reset before running docker tests 2018-10-03 10:32:16 -04:00
David Taylor 43ce4ce43a DEV: Add travis_fold statements to docker_test 2018-09-12 17:52:58 +01:00
Gerhard Schlager f47fff1ce3 docker.rake should pull the latest source 2018-05-15 15:09:49 +02:00
Gerhard Schlager 612792e69a Allow running smoke tests within docker image with latest code 2017-12-20 15:59:21 +01:00
David Taylor b3bba8e2ae Combine docker:lint and docker:test into one command 2017-08-22 13:47:29 +01:00
David Taylor c2015b0eec Add documentation to docker_test.rb 2017-08-19 11:10:17 +01:00
Guo Xiang Tan fde3404651 Fix conditions. 2017-08-18 12:46:21 +09:00
Guo Xiang Tan af8f155e29 Extract linter in docker:test Rake task into docker:lint. 2017-08-18 12:22:01 +09:00
Robin Ward 1cb83bb5b1 Remove bundle-audit, it is not updated frequently enough 2017-05-18 12:31:19 -04:00
Robin Ward c7feff0e9c Add bundle-audit to our test script 2017-05-15 13:34:30 -04:00
Sam 7289e0b5fd Refactor: split out update process from docker test 2014-06-20 09:26:44 +10:00