1stages:
2 - test
3 - production
4
5test:
6 image: rust:alpine
7 stage: test
8 script:
9 - cargo install cargo2junit
10 - cargo test -- -Z unstable-options --format json --report-time | cargo2junit > results.xml
11 only:
12 - master
13 artifacts:
14 reports:
15 junit: results.xml
16
17production:
18 stage: production
19 image: ruby:latest
20 needs:
21 - test
22 script:
23 - apt-get update -qy
24 - apt-get install -y ruby-dev
25 - gem install dpl
26 - gem install faraday -v 1.8.0
27 - dpl --provider=heroku --app=$HEROKU_APP --api-key=$HEROKU_API_KEY
28 only:
29 - master