- 
                Notifications
    You must be signed in to change notification settings 
- Fork 16
Hawken's Links
- 
facebook/dataloader– Something something batches data requests
- 
ReactVT/react-vt– Graphical tool to define flows through your app to test with Enzyme
- 
JumboInteractiveLimited/redux-cache– Caching layer for Redux stores
- 
https://github.com/travis-ci/travis-ci/issues/2778#issuecomment-329968553 – example of doing conditional stages based on branches. Unhelpful for us on its own, but sparked an idea in my head once that I've now forgotten 
- 
https://github.com/oblador/react-native-store-review Review the app in-app 
- 
https://medium.com/@kentcdodds/introducing-downshift-for-react-b1de3fca0817 
https://storybook.js.org/
https://github.com/storybooks/storybook/tree/master/app/react-native
https://github.com/oblador/loki/
Storybook and visual regression testing
env:
  # To update the secure tokens, run `travis encrypt NAME='VALUE' --add` after
  # installing the travis gem with `gem install travis`.
  global:
    # `match` keychain info – the values don't matter, they're defined
    # here so they're consistent throughout
    - MATCH_KEYCHAIN_NAME=travis-ios-keychain
    - MATCH_KEYCHAIN_PASSWORD=alpine
    # dirty hack for https://github.com/travis-ci/travis-ci/issues/5092
    - PATH=${PATH/\.\/node_modules\/\.bin/}
    # sets our node version in one nice place
    - TRAVIS_NODE_VERSION=8
    # set the ruby version up top
    - TRAVIS_RUBY_VERSION=ruby-2.4.2
    # GH_TOKEN:
    # - used by greenkeeper to update package-lock.json
    - secure: s2HicpDrioxVuS/1KyDMgFkgbM3eVxp1FVF1R922oKeUGhtNFERufXp+nXaG98trqmJhfjfx243i7qP8oEX1DoGtFAHAuILBG0KTXoY1HZG/ZlVpc2pjRQmfCt3tJCs8Trovv2q2yM21JtTKXJ6wZ+XUGK0zqXbd4IH7k30Q649CIZ+l/pcU4cVqoLojekFWMQuW9onPOiTGtBckdPngmJ9GgAGDQesYjZ/p5RTaggCleD4oFmgkUdPZtityr+6TYe6cU9fFIVHyxe5F4JsiXB2aKk0qbX86tXUdlneOTYAw0YsxzVbpjtjVeedG3lm+UDAABznaqyuj4EI2+ERIXEMXtDzG+knQuQIF1P9E5ZWRanuSbfwFRJecPXyw03AtT+lBEHls1klRFep0yYzSKPunuqyeFZG+QFFtiegPnk7C4R2KfJhghB8kr8Ysgwg1YJXP77AaTBET0YsEvhMNNqEGK0LsXhZJUCWUnZfINFwp8ggEB8ZHWqWmTD2SxufqWXCzcMBnNdyuoDAH8//myA/09UcxzRpQwBqy3wH/Nlb47n+RydQxxiSmpTw0xAa5f9/qRjy0DrIT0PowDN1VGLgy6wQIqzAN6Ex4Y7AIyaTZrga7cbpfHE7lKee8XTTfDJnfGywJ1+3CqpZpA1jQhRzeGQbxPfghaOxzI46i4p4=
# As seen in http://stackoverflow.com/a/31882307/2347774
# Prevent travis from building twice for PRs
branches:
  only:
    - master
    - /^travis/
    - /^greenkeeper\//
    - /^v?(?:0|[1-9]\d*)\.(?:0|[1-9]\d*)\.(?:0|[1-9]\d*)(?:-[\da-z\-]+(?:\.[\da-z\-]+)*)?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?$/
stages:
  - name: Greenkeeper
    if: branch =~ ^greenkeeper\/
  - name: Test
  - name: Deploy Data
    if: branch = master AND type != pull_request
  - name: Build + Deploy App
jobs:
  # We define default before_install, install, and before_script steps.
  # To skip the default step, use `step_name: skip`.
  include:
    # Run greenkeeper stuff
    - stage: Greenkeeper
      os: linux
      sudo: false
      language: node_js
      node_js: node # install the latest node
      env: [TASK=greenkeeper]
      install: npm install -g greenkeeper-lockfile@1
      script: greenkeeper-lockfile-update
      after_script: greenkeeper-lockfile-upload
    # Lint the JS code
    - <<: &test-base
      stage: Test
      env: [TASK=lint]
      script:
        - set -o pipefail
        - npm run prettier
        - if ! git diff --quiet ./*.js source/; then
            git diff ./*.js source/ > logs/prettier;
          fi
        - npm run lint | tee logs/eslint
      after_script: npm run danger -- --danger-id lint
    # Lint the Ruby code
    - stage: Test
      os: linux
      sudo: false
      distro: trusty
      language: ruby
      env: [TASK=rubocop]
      install: bundle install || bundle install
      before_script: mkdir -p logs/
      script:  bundle exec rubocop --fail-level A | tee logs/rubocop
      after_script: bundle exec danger --danger_id=rubocop
    # Check the flow types
    - <<: *js-base
      stage: Test
      env: [TASK=flow]
      script:
        - set -o pipefail
        - npm run bundle-data
        - npm run flow -- check --quiet | tee logs/flow
      after_script: npm run danger -- --danger-id flow
    # Check the validity of the datafiles
    - <<: *js-base
      stage: Test
      env: [TASK=check-data]
      script:
        - set -o pipefail
        - npm run validate-data -- --quiet | tee logs/validate-data
        - npm run bundle-data | tee logs/bundle-data
      after_script: npm run danger -- --danger-id data
    # Run Jest tests on the JS and submit code coverage reports
    - <<: *js-base
      stage: Test
      env: [TASK=jest]
      script:
        - set -o pipefail
        - npm run bundle-data
        - npm run test -- --coverage --outputFile logs/jest.json --json
      after_script: npm run danger -- --danger-id jest
      after_success: npx coveralls < ./coverage/lcov.info
    # Deploy the gh-pages data
    - stage: Deploy Data
      os: linux
      sudo: false
      distro: trusty
      language: node_js
      node_js: $TRAVIS_NODE_VERSION
      env: [TASK=gh_pages]
      install: yarn || yarn
      script: npm run bundle-data
      deploy:
        provider: pages
        skip_cleanup: true
        github_token: $GITHUB_PAGES_TOKEN
        local_dir: docs/
    # Build/deploy the Android binary
    - <<: *build-base
      stage: Build + Deploy
      os: linux
      sudo: required
      distro: trusty
      language: android
      env: [TASK=android]
      android:
        components:
          - tools
          - platform-tools
          - build-tools-23.0.1
          - build-tools-23.0.2
          - build-tools-25.0.1
          - build-tools-25.0.2
          - build-tools-25.0.3
          - build-tools-26.0.1
          - android-23
          - android-25
          - android-26
          - extra-android-m2repository
          - extra-google-m2repository
      script:
        - set -o pipefail
        - bundle exec fastlane android ci-run | tee logs/fastlane
      after_script: bundle exec danger --danger_id=android-build
    # Build/deploy the iOS binary
    - <<: *build-base
      stage: Build + Deploy
      os: osx
      language: objective-c
      osx_image: xcode9
      env: [TASK=ios]
      script:
        - set -o pipefail
        - bundle exec fastlane ios ci-run | tee logs/fastlane
      after_script: bundle exec danger --danger_id=ios-build
#
# All of the keys down here are used in each build stage, unless they're overridden.
#
x-test-base: &test-base
  os: linux
  sudo: false
  distro: trusty
  language: node_js
  node_js: $TRAVIS_NODE_VERSION
  install: yarn || yarn
  before_script:
    - echo "loglevel=silent" >> .npmrc
    - mkdir -p logs/
x-build-base: &build-base
  before_install:
    # print some travis debugging info
    - echo "Now testing on $TRAVIS_OS_NAME"
    - echo "Travis branch is $TRAVIS_BRANCH"
    - echo "Travis is in pull request $TRAVIS_PULL_REQUEST"
    - echo "Build triggered by $TRAVIS_EVENT_TYPE"
    # force the ruby we want
    - echo "Using ruby $TRAVIS_RUBY_VERSION (ruby -v says $(ruby -v))"
    - rvm use $TRAVIS_RUBY_VERSION --install --binary --create
    - echo "ruby -v is now $(ruby -v)"
    - gem install bundler
    # force a consistent node version
    - echo "Using node $TRAVIS_NODE_VERSION (node -v says $(node -v))"
    - nvm install "$TRAVIS_NODE_VERSION"
    - nvm use "$TRAVIS_NODE_VERSION"
    - echo "node -v is now $(node -v)"
    # travis doesn't install yarn automatically on osx
    - if [[ $TRAVIS_OS_NAME == "osx" ]]; then brew install yarn --without-node; fi
  install:
    # install packages (if the first fails, try once more)
    - yarn || yarn
    # install fastlane (if at first you don't succeed, try once more)
    - bundle install || bundle install
  before_script:
    # ensure the env file exists and fill it out
    - touch .env.js
    - echo "export const GOOGLE_CALENDAR_API_KEY = '$GCAL_KEY'" >> .env.js
    - echo "export const GOOGLE_MAPS_API_KEY = '$GMAPS_KEY'" >> .env.js
    # disable npm wrapper for npm scripts
    - echo "loglevel=silent" >> .npmrc
    # create logs folder for danger
    - mkdir -p logs/
before_cache:
  - rm -f  $HOME/.gradle/caches/modules-2/modules-2.lock
  - rm -fr $HOME/.gradle/caches/*/plugin-resolution/
  - rm -rf $TMPDIR/jest_preprocess_cache
cache:
  bundler: true
  directories:
    - $HOME/.gradle
    - $HOME/.gradle/wrapper/
    - $HOME/.android/build-cache