I want to use CircleCI just to push my docker image to Dockerhub when I merge with master. I am using CircleCI in other projects where it is more useful and want to be consistent (as well as I am planning to add tests later). However all my builds fail because CircleCI says: "NO TESTS!", which is true. How can I disable CircleCI from checking for tests presence.
Asked
Active
Viewed 8,213 times
3 Answers
45
I solved the problem by overriding the test section of circle.yml:
test:
override:
- echo "test"
This works for CircleCI 1.0

Ela
- 3,142
- 6
- 25
- 40
-
You can also use `true` as the command. This is theoretically better because it actually returns a status code instead of just outputting text. – lachie_h Feb 15 '17 at 19:41
-
Please be careful to choose CircleCI 1.0 otherwise this will not work. – Jonathan Muszkat Oct 10 '17 at 00:55
-
1
17
Alternatively, as cited on this discussion, you can use "true"
to skip tests:
# circle.yml
...
test:
override:
- "true"
...
Please notice the double quotes as otherwise it won't work.
I hope that is helpful as it worked for me!

fagiani
- 2,293
- 2
- 24
- 31
-
2Double quotes! YAML strikes again... is YAML the AppleScript of data formats? – joerick May 29 '17 at 09:54
2
CircleCI 2.0 no longer requires a test section in your config.yml. Just leave it off!

Will
- 2,768
- 1
- 17
- 15