title: How to avoid reinstalling dependencies for each job in Gitlab CI
body: <p>I'm using <a href="https://gitlab.com/gitlab-org/gitlab-ci">Gitlab CI</a> 8.0 with <a href="https://gitlab.com/gitlab-org/gitlab-ci-multi-runner">gitlab-ci-multi-runner</a> 0.6.0. I have a <code>.gitlab-ci.yml</code> file similar to the following:</p>
  
  <pre><code>before_script:
    - npm install
  
  server_tests:
    script: mocha
  
  client_tests:
    script: karma start karma.conf.js
  </code></pre>
  
  <p>This works but it means the dependencies are installed independently before each test job. For a large project with many dependencies this adds a considerable overhead. </p>
  
  <p>In Jenkins I would use one job to install dependencies then TAR them up and create a build artefact which is then copied to downstream jobs. Would something similar work with Gitlab CI? Is there a recommended approach?</p>