Ignore IDN decoding errors.
[reddit.git] / .drone.yml
blobb39c7e1b3fb048a0a2a1723372749a41d2ad14f4
1 # This file is used by the Drone CI Server and Agents to determine what
2 # should happen (if anything) in response to git pushes and pull requests.
3 clone:
4   depth: 50
5   recursive: false
6   tags: false
7   # This is explicitly set so that forks retain a constant path.
8   path: /drone/src/github.com/reddit/reddit-public
10 compose:
11   # Some of these aren't actively used, but are required in that import
12   # side-effects cause connections to services (regardless of whether
13   # the services are interacted with in the tests). Each service is addressable
14   # via 'localhost' through whatever ports the image exposes.
15   postgres:
16     # Temporarily needed for this image + Docker-in-Docker. Expected to
17     # be removed when we upgrade to Drone 0.5.
18     # https://docs.docker.com/engine/reference/run/#runtime-privilege-and-linux-capabilities
19     privileged: true
20     image: postgres:9.3.12
21     environment:
22       POSTGRES_USER: reddit
23       POSTGRES_PASSWORD: password
24       POSTGRES_DB: reddit
26   cassandra:
27     privileged: true
28     # Cassandra 1.x is old enough not to have any official Docker images.
29     # In the meantime, we've got a custom image configured specifically for r2:
30     # https://github.com/reddit/docker-cassandra
31     # We'll move over to the official images when we upgrade to C* 2.x.
32     image: reddit/cassandra:single-1.2.19-v1
34   rabbitmq:
35     # NOTE: Using 3.4.x instead of 3.2.4 due to tag availability.
36     image: rabbitmq:3.4
37     environment:
38       RABBITMQ_DEFAULT_VHOST: /
39       RABBITMQ_DEFAULT_USER: reddit
40       RABBITMQ_DEFAULT_PASS: reddit
42   memcached:
43     # NOTE: Using 1.4.21 instead of 1.4.17 due to tag availability.
44     image: memcached:1.4.21
46   zookeeper:
47     image: jplock/zookeeper:3.4.6
49 # Build steps are where the setup, compilation, and tests happen.
50 build:
51   # This is a fat Docker image with the apt dependencies pre-installed.
52   # https://github.com/reddit/docker-reddit-py
53   # Dependency changes in the install scripts can be optionally mirrored to the
54   # image for speedups, but abstaining from doing so won't break the builds.
55   image: reddit/reddit-py:latest
56   # Always re-pull the image, since we're re-using the same tag.
57   pull: true
58   environment:
59     DEBIAN_FRONTEND: noninteractive
60   commands:
61     # Prepares the environment for the test run.
62     - install/drone.sh
63     - cd r2
64     - nosetests -v .
65     - cd ..
66     - ./scripts/stylecheck_git_diff.sh
68 # These plugins are triggered after a build failure/success.
69 notify:
70   slack:
71     webhook_url: $$CI_SLACK_WEBHOOK_URL
72     channel: ci-notifications