github.com/grumpyhome/grumpy@v0.3.1-0.20201208125205-7b775405bdf1/.travis.yml (about) 1 language: python 2 3 cache: 4 directories: 5 - $HOME/.cache/pip 6 - $HOME/.cache/pre-commit 7 8 matrix: 9 allow_failures: 10 - python: 3.8 11 - env: GO="stable" 12 include: 13 - python: 2.7 14 env: GO=1.10.x 15 - python: 2.7 16 env: GO=stable # Currently 1.11 17 - python: 3.8 18 env: GO=1.10.x 19 script: # To detect Python 3 syntax errors in grumpy-tools 20 - pip install --upgrade flake8 21 - flake8 --count --select=E901,E999,F821,F822,F823 --show-source --statistics grumpy-tools-src 22 - os: osx 23 language: go 24 go: 1.10.x 25 env: OSX_PYTHON=2.7 26 install: HOMEBREW_NO_AUTO_UPDATE=1 brew reinstall python@2 27 28 install: 29 - | 30 export GOPATH=~/gopath 31 export PATH="$GOPATH/bin:$PATH" 32 export TRAVIS_BUILD_DIR="$GOPATH/src/github.com/$TRAVIS_REPO_SLUG" 33 mkdir -p "$TRAVIS_BUILD_DIR" 34 rsync -az . "$TRAVIS_BUILD_DIR" 35 cd "$TRAVIS_BUILD_DIR" 36 # Use the current gimme because Travis gimme does not support syntax "1.10.x" and "stable" 37 eval "$(curl -sL https://raw.githubusercontent.com/travis-ci/gimme/master/gimme | GIMME_GO_VERSION=${GO} bash)" 38 39 before_script: 40 - go version && python --version && python -m pip --version 41 # https://github.com/travis-ci/travis-ci/issues/8920#issuecomment-352661024 42 - python -c "import fcntl; fcntl.fcntl(1, fcntl.F_SETFL, 0)" 43 - pip install --upgrade pip 44 - pip install 'pytest==3.8.1' 'pytest-cov==2.6.0' 45 46 script: 47 # Install the thing 48 - cd grumpy-tools-src 49 - pip install . 50 - which grumpy 51 - cd ../grumpy-runtime-src 52 - pip install . 53 # Test the thing 54 # Run gofmt and lint serially to avoid confusing output. Run tests in parallel 55 # for speed. 56 - cd ../grumpy-tools-src 57 - pytest 58 - cd ../grumpy-runtime-src 59 - make gofmt lint && make -j2 test 60 61 # OSX swallows error logs: https://github.com/travis-ci/travis-ci/issues/6018 62 after_error: 63 - echo "== End of test log ==""