Skip to content

Commit

Permalink
Fixing Circle CI definition
Browse files Browse the repository at this point in the history
  • Loading branch information
etki committed Jul 7, 2017
1 parent cd66215 commit f223832
Showing 1 changed file with 19 additions and 12 deletions.
31 changes: 19 additions & 12 deletions circle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ parameters:
allure:
version: &allure_version 2.2.1
cache_key: &allure_cache_key allure-2.2.1
bundler:
cache_key: &bundler_cache_key bundler-{{ checksum "Gemfile" }}

version: 2
jobs:
Expand All @@ -20,24 +22,30 @@ jobs:
ALLURE_VERSION: *allure_version
steps:
- checkout
- restore-cache:
keys:
- *bundler_cache_key
- *jabba_cache_key
- *allure_cache_key
- run:
name: Install dependencies
command: bundle install
- type: cache-restore
key: *jabba_cache_key
command: bundle install --path vendor/bundle
- type: save-cache
key: *bundler_cache_key
paths:
- vendor/bundle
- Gemfile.lock
- run:
name: Install Jabba & Java
command: |
set -euxo pipefail
[ ! -d ~/.jabba ] || exit 0
curl -sL https://github.com/shyiko/jabba/raw/master/install.sh | bash && . ~/.jabba/jabba.sh
jabba install $JAVA_VERSION
- type: cache-save
- type: save-cache
key: *jabba_cache_key
paths:
- ~/.jabba
- type: cache-restore
key: *allure_cache_key
- run:
name: Install Allure
command: |
Expand All @@ -48,7 +56,7 @@ jobs:
unzip /tmp/allure.zip -d /tmp/allure
sudo mkdir -p /usr/local/share/allure/commandline
sudo mv /tmp/allure/*/* /usr/local/share/allure/commandline/
- type: cache-save
- type: save-cache
key: *allure_cache_key
paths:
- /usr/local/share/allure
Expand All @@ -62,20 +70,19 @@ jobs:
- run:
name: Chores
command: mkdir -p test/metadata
- type: store_artifacts
- type: store-artifacts
path: test/metadata
destination: metadata
when: always
- run:
name: Generate Allure report
command: |
env
~/.jabba/bin/jabba use $JAVA_VERSION
export JAVA_HOME="$JAVA_HOME"
env
export JAVA_HOME="$(jabba which $JAVA_VERSION)"
env | grep JAVA
bundle exec rake test:report
when: always
- type: store_artifacts
- type: store-artifacts
path: test/report/allure
destination: allure
when: always

0 comments on commit f223832

Please sign in to comment.