summaryrefslogtreecommitdiff
path: root/.gitlab-ci.yml
blob: da908634a09c445d7d3b06cca26b0e03bbd555ab (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
stages:
  - code-check
  - tests
  - benchmark

# Cache tox envs between builds
cache:
  paths:
  - testing/.tox/

code-check:
  stage: code-check
  image: leapcode/soledad:latest
  script:
    - cd testing
    - tox -e code-check

tests:
  stage: tests
  image: leapcode/soledad:latest
  services:
    - couchdb
  script:
    - cd testing
    - tox -- --couch-url http://couchdb:5984

benchmark:
  stage: benchmark
  image: leapcode/soledad:latest
  tags:
    - benchmark
  services:
    - couchdb
  allow_failure: true
  script:
    - cd testing
    - curl -s couchdb:5984
    # You can provide a $NETRC variable containing the creds for your
    # elasticsearch instance so it's protected from being leaked in the
    # CI console
    # We can't get it working inside docker for unknown reasons.
    #- echo "$NETRC" > /root/.netrc && chmod 600 /root/.netrc
    #
    # Add $PYTEST_OPTS to pytest.ini to allow posting benchmark tests
    # to an elasticsearch instance
    - echo "addopts=$PYTEST_OPTS" >> pytest.ini && chmod 600 pytest.ini
    - tox --recreate -e benchmark -- --couch-url http://couchdb:5984