Skip to content

Commit

Permalink
Use CircleCI instead of TravisCI
Browse files Browse the repository at this point in the history
  • Loading branch information
sue445 committed Jul 4, 2018
1 parent c7f9b07 commit 7752259
Show file tree
Hide file tree
Showing 4 changed files with 156 additions and 35 deletions.
146 changes: 146 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,146 @@
# Ruby CircleCI 2.0 configuration file
#
# Check https://circleci.com/docs/2.0/language-ruby/ for more details
#
version: 2

environment: &environment
LANG: en_US.UTF-8
LANGUAGE: en_US.UTF-8
LC_ALL: C.UTF-8

BUNDLE_PATH: vendor/bundle
BUNDLE_JOBS: 4
CODECLIMATE_REPO_TOKEN: 89b665462d69ce4c873ee8165d496c4a97b9afaaf48e375c1bc3200e4b45b1e7

default: &default
docker:
- image: circleci/ruby
environment:
<<: *environment

working_directory: ~/app

restore_repo_cache_option: &restore_repo_cache_option
key: v1-repo-{{ .Environment.CIRCLE_SHA1 }}

save_repo_cache_option: &save_repo_cache_option
key: v1-repo-{{ .Environment.CIRCLE_SHA1 }}
paths:
- ~/app

restore_bundle_cache_option: &restore_bundle_cache_option
keys:
- v1-bundle-{{ .Environment.CIRCLE_JOB }}-{{ epoch }}
- v1-bundle-{{ .Environment.CIRCLE_JOB }}

save_bundle_cache_option: &save_bundle_cache_option
key: v1-bundle-{{ .Environment.CIRCLE_JOB }}-{{ epoch }}
paths:
- ~/app/vendor/bundle
- ~/app/Gemfile.lock

rspec_steps: &rspec_steps
- restore_cache:
<<: *restore_repo_cache_option
- restore_cache:
<<: *restore_bundle_cache_option
- run: ./.circleci/setup.sh
- save_cache:
<<: *save_bundle_cache_option

- run: bundle exec rspec
- run: bundle exec codeclimate-test-reporter

build_jobs: &build_jobs
- checkout_code
- ruby:2.1:
requires:
- checkout_code
- ruby:2.2:
requires:
- checkout_code
- ruby:2.3:
requires:
- checkout_code
- ruby:2.4:
requires:
- checkout_code
- ruby:2.5:
requires:
- checkout_code

jobs:
checkout_code:
<<: *default

steps:
- checkout

- save_cache:
<<: *save_repo_cache_option

ruby:2.1:
<<: *default

docker:
- image: circleci/ruby:2.1-browsers
environment:
<<: *environment

steps: *rspec_steps

ruby:2.2:
<<: *default

docker:
- image: circleci/ruby:2.2-browsers
environment:
<<: *environment

steps: *rspec_steps

ruby:2.3:
<<: *default

docker:
- image: circleci/ruby:2.3-browsers
environment:
<<: *environment

steps: *rspec_steps

ruby:2.4:
<<: *default

docker:
- image: circleci/ruby:2.4-browsers
environment:
<<: *environment

steps: *rspec_steps

ruby:2.5:
<<: *default

docker:
- image: circleci/ruby:2.5-browsers
environment:
<<: *environment

steps: *rspec_steps

workflows:
version: 2

build:
jobs: *build_jobs

weekly_build:
triggers:
- schedule:
cron: "00 19 * * 5" # JST 4:00 (Sat)
filters:
branches:
only: master
jobs: *build_jobs
9 changes: 9 additions & 0 deletions .circleci/setup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/bash -xe

ruby --version
bundle --version
gem --version

bundle check || bundle install --path=${BUNDLE_PATH:-vendor/bundle}
bundle update
bundle clean
34 changes: 0 additions & 34 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
[Apple System Status](https://www.apple.com/support/systemstatus/) scraping library

[![Gem Version](https://badge.fury.io/rb/apple_system_status.svg)](http://badge.fury.io/rb/apple_system_status)
[![Build Status](https://travis-ci.org/sue445/apple_system_status.svg?branch=master)](https://travis-ci.org/sue445/apple_system_status)
[![CircleCI](https://circleci.com/gh/sue445/apple_system_status/tree/master.svg?style=svg)](https://circleci.com/gh/sue445/apple_system_status/tree/master)
[![Code Climate](https://codeclimate.com/github/sue445/apple_system_status/badges/gpa.svg)](https://codeclimate.com/github/sue445/apple_system_status)
[![Test Coverage](https://codeclimate.com/github/sue445/apple_system_status/badges/coverage.svg)](https://codeclimate.com/github/sue445/apple_system_status/coverage)
[![Coverage Status](https://coveralls.io/repos/sue445/apple_system_status/badge.svg?branch=master&service=github)](https://coveralls.io/github/sue445/apple_system_status?branch=master)
Expand Down

0 comments on commit 7752259

Please sign in to comment.