6
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

TravisCIでRedisを使うときの.travis.ymlの設定

Posted at

趣味でRailsアプリを書いてて、TravisCIの結果をGitHub :octocat: のREADME.mdにバッチとして貼っているんですが、スクレイピングで取得した情報をRedisを使ってキャッシュするようにしたらTravis側で

Redisがないからアプリ動かない

という問題が発生。
「TravisCI、Redis動くのかなー」と思って調べたら速攻で解決したので、メモ程度に残しとく。

変更するのは、TravisCIの設定ファイル「.travis.yml」1つだけ。

.travis.yml
services:
    - redis-server

を追記するだけです。カンタンですねー。TravisCI便利です :blush:

これで、GitHubへソースをpushすればTravisCI側でビルドが走るときにRedisが勝手に起動します。

redis_travis.jpg

6
4
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
6
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?