cheatsheets/travis.html

322 lines
8.6 KiB
HTML

<!doctype html>
<html lang='en' class='no-js '>
<head>
<meta charset='utf-8'>
<meta content='width=device-width, initial-scale=1.0' name='viewport'>
<link href='./assets/favicon.png' rel='shortcut icon'>
<meta content='/travis.html' name='app:pageurl'>
<title>Travis.yml cheatsheet</title>
<meta content='Travis.yml cheatsheet' property='og:title'>
<meta content='Travis.yml cheatsheet' property='twitter:title'>
<meta content='article' property='og:type'>
<meta content='https://assets.devhints.io/previews/travis.jpg?t=20200623143953' property='og:image'>
<meta content='https://assets.devhints.io/previews/travis.jpg?t=20200623143953' property='twitter:image'>
<meta content='900' property='og:image:width'>
<meta content='471' property='og:image:height'>
<meta content="The one-page guide to Travis.yml: usage, examples, links, snippets, and more." name="description">
<meta content="The one-page guide to Travis.yml: usage, examples, links, snippets, and more." property="og:description">
<meta content="The one-page guide to Travis.yml: usage, examples, links, snippets, and more." property="twitter:description">
<link rel="canonical" href="https://devhints.io/travis">
<meta name="og:url" content="https://devhints.io/travis">
<meta content='Devhints.io cheatsheets' property='og:site_name'>
<meta content='Devops' property='article:section'>
<script async src='https://www.googletagmanager.com/gtag/js?id=UA-106902774-1'></script>
<script>
window.dataLayer=window.dataLayer||[];
function gtag(){dataLayer.push(arguments)};
gtag('js',new Date());
gtag('config','UA-106902774-1');
</script>
<meta property='page:depth' content='1'>
<script>(function(H){H.className=H.className.replace(/\bno-js\b/,'js')})(document.documentElement)</script>
<script>(function(H){H.className=H.className.replace(/\bNoJs\b/,'WithJs')})(document.documentElement)</script>
<script>(function(d,s){if(window.Promise&&[].includes&&Object.assign&&window.Map)return;var js,sc=d.getElementsByTagName(s)[0];js=d.createElement(s);js.src='https://cdn.polyfill.io/v2/polyfill.min.js';sc.parentNode.insertBefore(js, sc);}(document,'script'))</script>
<!--[if lt IE 9]><script src='https://cdnjs.cloudflare.com/ajax/libs/nwmatcher/1.2.5/nwmatcher.min.js'></script><script src='https://cdnjs.cloudflare.com/ajax/libs/json2/20140204/json2.js'></script><script src='https://cdn.rawgit.com/gisu/selectivizr/1.0.3/selectivizr.js'></script><script src='https://cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv.min.js'></script><script src='https://cdnjs.cloudflare.com/ajax/libs/respond.js/1.4.2/respond.js'></script><![endif]-->
<style>html{opacity:0}</style>
<link rel="stylesheet" href="./assets/2015/style.css?t=20200623143953">
<link href="./assets/style.css?t=20200623143953" rel="stylesheet" />
<link href="./assets/print.css?t=20200623143953" rel="stylesheet" media="print" />
</head>
<body>
<div class='all'>
<div class='site-header'>
<div class='container'>
This is <a href="."><em>Devhints.io cheatsheets</em></a> &mdash; a collection of cheatsheets I've written.
</div>
</div>
<script type='application/ld+json'>
{
"@context": "http://schema.org",
"@type": "NewsArticle",
"mainEntityOfPage": {
"@type": "WebPage",
"@id": "https://google.com/article"
},
"headline": "Travis.yml cheatsheet",
"image": [ "https://assets.devhints.io/previews/travis.jpg?t=20200623143953" ],
"description": "The one-page guide to Travis.yml: usage, examples, links, snippets, and more."
}
</script>
<script type='application/ld+json'>
{
"@context": "http://schema.org",
"@type": "BreadcrumbList",
"itemListElement": [{
"@type": "ListItem",
"position": 1,
"item": {
"@id": "https://devhints.io/#devops",
"name": "Devops"
}
},{
"@type": "ListItem",
"position": 2,
"item": {
"@id": "https://devhints.io/travis",
"name": "Travis.yml"
}
}]
}
</script>
<div class='post-list -single -cheatsheet'>
<div class='post-item'>
<div class='post-headline -cheatsheet'>
<p class='prelude'><span></span></p>
<h1><span>Travis.yml</span></h1>
<ul class="social-list ">
<li class="facebook link hint--bottom" data-hint="Share on Facebook"><a href="https://www.facebook.com/sharer/sharer.php?u=https://devhints.io/travis.html" target="share"><span class="text"></span></a></li>
<li class="twitter link hint--bottom" data-hint="Share on Twitter"><a href="https://twitter.com/intent/tweet?text=The%20ultimate%20cheatsheet%20for%20Travis.yml.%20https://devhints.io/travis.html" target="share"><span class="text"></span></a></li>
</ul>
</div>
<div class='post-content -cheatsheet'>
<h3 id="node">Node</h3>
<pre><code class="language-yml">language: node_js
node_js:
- '4'
</code></pre>
<ul>
<li>Provides: 0.10, 0.8, 0.6, 0.11 (latest dev)</li>
<li>Defaults install to <code>npm install</code></li>
<li>Defaults test to <code>npm test</code></li>
</ul>
<h3 id="ruby">Ruby</h3>
<pre><code class="language-yml">language: ruby
rvm:
- 2.0.0
- 1.9.3
- 1.8.7
- rbx-19mode
- jruby-19mode
- jruby-18mode
</code></pre>
<ul>
<li>Defaults install to <code>bundle install</code></li>
<li>Defaults test to <code>rake</code></li>
</ul>
<h3 id="build-lifecycle">Build lifecycle</h3>
<ul>
<li><code>before_install</code></li>
<li><code>install</code></li>
<li><code>before_script</code></li>
<li><code>script</code></li>
<li><code>after_success</code> or <code>after_failure</code></li>
<li><code>after_script</code></li>
<li>OPTIONAL <code>before_deploy</code></li>
<li>OPTIONAL <code>deploy</code></li>
<li>OPTIONAL <code>after_deploy</code></li>
</ul>
<h3 id="branches">Branches</h3>
<pre><code>branches:
except: [".."]
only: ["master"]
</code></pre>
<h3 id="environment-vars">Environment vars</h3>
<pre><code>env:
- "rack=master"
- "rack=1.3.4"
</code></pre>
<h3 id="custom-test-command">Custom test command</h3>
<pre><code>script: make test
before_script: make pretest
after_script: make clean
before_script:
- make pretest1
- make pretest2
</code></pre>
<h3 id="branches-1">Branches</h3>
<pre><code>branches:
except:
- legacy
only:
- gh-pages
- /^deploy/
</code></pre>
<h3 id="apt-packages">Apt packages</h3>
<pre><code>before_install:
- sudo apt-get update -q
- sudo apt-get install gcc-4.8 -y
</code></pre>
<p><a href="https://docs.travis-ci.com/user/installing-dependencies/">https://docs.travis-ci.com/user/installing-dependencies/</a></p>
<h3 id="etc">Etc</h3>
<pre><code>gemfile:
- gemfiles/Gemfile.rails-2.3.x
- gemfiles/Gemfile.rails-3.0.x
</code></pre>
<h3 id="notifications">Notifications</h3>
<pre><code>notifications:
email:
- dropbox+travis@ricostacruz.com
email:
recipients:
- dropbox+travis@ricostacruz.com
on_success: &lt;always|never|change&gt; # default: change
on_failure: &lt;always|never|change&gt; # default: always
irc: "chat.freenode.net#travis"
</code></pre>
<h3 id="references">References</h3>
<ul>
<li>http://about.travis-ci.org/docs/user/build-configuration/</li>
<li>http://about.travis-ci.org/docs/user/languages/javascript-with-nodejs/</li>
<li>http://about.travis-ci.org/docs/user/languages/ruby/</li>
</ul>
</div>
<ul class="social-list ">
<li class="facebook link hint--bottom" data-hint="Share on Facebook"><a href="https://www.facebook.com/sharer/sharer.php?u=https://devhints.io/travis.html" target="share"><span class="text"></span></a></li>
<li class="twitter link hint--bottom" data-hint="Share on Twitter"><a href="https://twitter.com/intent/tweet?text=The%20ultimate%20cheatsheet%20for%20Travis.yml.%20https://devhints.io/travis.html" target="share"><span class="text"></span></a></li>
</ul>
</div>
</div>
<div class="about-the-site">
<div class="container">
<p class='blurb'>
<strong><a href=".">Devhints.io cheatsheets</a></strong> is a collection of cheatsheets I've written over the years.
Suggestions and corrections? <a href='https://github.com/rstacruz/cheatsheets/issues/907'>Send them in</a>.
<i class='fleuron'></i>
I'm <a href="http://ricostacruz.com">Rico Sta. Cruz</a>.
Check out my <a href="http://ricostacruz.com/til">Today I learned blog</a> for more.
</p>
<p class='back'>
<a class='big-button -back -slim' href='.#toc'></a>
</p>
<p>
</p>
</div>
</div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/8.5/highlight.min.js"></script>
<script src="https://cdn.rawgit.com/rstacruz/unorphan/v1.0.1/index.js"></script>
<script>hljs.initHighlightingOnLoad()</script>
<script>unorphan('h1, h2, h3, p, li, .unorphan')</script>
</body>
</html>