image: golang:1.10.3-stretch

cache:
  paths:
    - /apt-cache
    - /go/src/github.com
    - /go/src/golang.org
    - /go/src/google.golang.org
    - /go/src/gopkg.in

stages:
  - test
  - build

before_script:
  - pip2 install pytest pytest-cov

install_and_test:
  stage: test
  script:
    # Install the thing
    - cd grumpy-tools-src
    - pip2 install .
    - cd ../grumpy-runtime-src
    - pip2 install .
    # Test the thing
    - cd ../grumpy-tools-src
    - pytest
    - cd ../grumpy-runtime-src
    - make gofmt lint && make -j1 test

image: golang:1.10.3-stretch

cache:
  paths:
    - /apt-cache
    - /go/src/github.com
    - /go/src/golang.org
    - /go/src/google.golang.org
    - /go/src/gopkg.in

stages:
  - test
  - build

before_script:
  - apt-get update && apt-get install -y --no-install-recommends python2 python2-dev python2-setuptools
  - easy_install pip
  - pip2 install pytest pytest-cov

install_and_test:
  stage: test
  script:
    # Install the thing
    - cd grumpy-tools-src
    - pip2 install .
    - cd ../grumpy-runtime-src
    - pip2 install .
    # Test the thing
    - cd ../grumpy-tools-src
    - pytest
    - cd ../grumpy-runtime-src
    - make gofmt lint && make -j1 test

Install the python before trying to use pip
Install the python before trying to use pip
