aboutsummaryrefslogtreecommitdiffhomepage
path: root/.circleci/config.yml
blob: bb39c2c27173ddc383fd7637a0fc78e5151a96cc (plain) (blame)
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
version: 2.1
orbs:
  slack: circleci/slack@3.4.2

jobs:
  build:
    docker:
      - image: 218546966473.dkr.ecr.us-east-1.amazonaws.com/circle-ci:tap-tester
    steps:
      - checkout
      - run:
          name: 'Setup virtual env'
          command: |
            virtualenv -p python3 ~/.virtualenvs/tap-google-sheets
            source ~/.virtualenvs/tap-google-sheets/bin/activate
            pip install .
            pip install pylint
            pylint tap_google_sheets -d C,R,W
      - run:
          name: 'Unit Tests'
          command: |
            source ~/.virtualenvs/tap-google-sheets/bin/activate
            pip install nose
            nosetests
      - run:
          name: 'JSON Validator'
          command: |
            source /usr/local/share/virtualenvs/tap-tester/bin/activate
            stitch-validate-json ~/.virtualenvs/tap-google-sheets/lib/python3.5/site-packages/tap_google_sheets/schemas/*.json
      - add_ssh_keys
      - run:
          name: 'Integration Tests'
          command: |
            aws s3 cp s3://com-stitchdata-dev-deployment-assets/environments/tap-tester/sandbox dev_env.sh
            source dev_env.sh
            source /usr/local/share/virtualenvs/tap-tester/bin/activate
            run-a-test --tap=tap-google-sheets \
                       --target=target-stitch \
                       --orchestrator=stitch-orchestrator \
                       --email=harrison+sandboxtest@stitchdata.com \
                       --password=$SANDBOX_PASSWORD \
                       --client-id=50 \
                       tap_tester.suites.google_sheets
      - slack/notify-on-failure:
          only_for_branches: master

workflows:
  version: 2
  commit:
    jobs:
      - build:
          context: circleci-user
  build_daily:
    triggers:
      - schedule:
          cron: "0 0 * * *"
          filters:
            branches:
              only:
                - master
    jobs:
      - build:
          context: circleci-user