<!DOCTYPE html>
<html lang="en-us">
    <head>
        

        <title>
            
            
                利用Travis做持续构建测试 | 一言
            
        </title>

        <meta name="title" content="利用Travis做持续构建测试 | 一言">

        <meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="chrome=1">
        <meta name="HandheldFriendly" content="True">
        <meta name="MobileOptimized" content="320">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <meta name="referrer" content="no-referrer-when-downgrade">
        <meta name="generator" content="">
        <base href="http://blog.zhouyiyan.cn/">
        <meta name="description" content="Full-stack web developer and UI/UX enthusiast based in Shanghai, China.">
        
        <meta name="author" content="Yiyan Zhou (沪ICP备12034897号-1)">
        
        <meta name="twitter:card" content="summary_large_image">
        <meta name="twitter:site" content="@balzaczyy">
        <meta name="twitter:creator" content="@balzaczyy">
        
        <meta property="og:title" content="利用Travis做持续构建测试 | 一言">
        <meta property="og:type" content="website">
        <meta property="og:url" content="http://blog.zhouyiyan.cn/">
        <meta property="og:image" content="http://blog.zhouyiyan.cn//images/osprey.png">
        <meta property="og:description" content="Full-stack web developer and UI/UX enthusiast based in Shanghai, China.">
        

        
        <link rel="apple-touch-icon" sizes="57x57" href="http://blog.zhouyiyan.cn/images/logo/apple-icon-57x57.png">
        <link rel="apple-touch-icon" sizes="60x60" href="http://blog.zhouyiyan.cn/images/logo/apple-icon-60x60.png">
        <link rel="apple-touch-icon" sizes="72x72" href="http://blog.zhouyiyan.cn/images/logo/apple-icon-72x72.png">
        <link rel="apple-touch-icon" sizes="76x76" href="http://blog.zhouyiyan.cn/images/logo/apple-icon-76x76.png">
        <link rel="apple-touch-icon" sizes="114x114" href="http://blog.zhouyiyan.cn/images/logo/apple-icon-114x114.png">
        <link rel="apple-touch-icon" sizes="120x120" href="http://blog.zhouyiyan.cn/images/logo/apple-icon-120x120.png">
        <link rel="apple-touch-icon" sizes="144x144" href="http://blog.zhouyiyan.cn/images/logo/apple-icon-144x144.png">
        <link rel="apple-touch-icon" sizes="152x152" href="http://blog.zhouyiyan.cn/images/logo/apple-icon-152x152.png">
        <link rel="apple-touch-icon" sizes="180x180" href="http://blog.zhouyiyan.cn/images/logo/apple-icon-180x180.png">
        <link rel="icon" type="image/png" sizes="192x192"  href="images/logo/android-icon-192x192.png">
        <link rel="icon" type="image/png" sizes="32x32" href="http://blog.zhouyiyan.cn/images/logo/favicon-32x32.png">
        <link rel="icon" type="image/png" sizes="96x96" href="http://blog.zhouyiyan.cn/images/logo/favicon-96x96.png">
        <link rel="icon" type="image/png" sizes="16x16" href="http://blog.zhouyiyan.cn/images/logo/favicon-16x16.png">
        <link rel="manifest" href="images/logo/manifest.json">
        <meta name="msapplication-TileColor" content="#FFF">
        <meta name="msapplication-TileImage" content="/images/logo/ms-icon-144x144.png">
        <meta name="theme-color" content="#FFF">
        

        <link rel="canonical" href="http://blog.zhouyiyan.cn/blog/try-travis/">
        
        <link rel="stylesheet" href="http://blog.zhouyiyan.cn//styles/main.css" type="text/css">
        
        <link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.10.0/styles/github.min.css">
        
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');

ga('create', 'UA-897555-2', 'auto');
ga('send', 'pageview');
</script>

    </head>

    <body>
        

        

        <nav class="row middle-xs center-xs">
            <div class="col-xs-6 col-sm-1 logo">
                <a href="http://blog.zhouyiyan.cn/"><img src="http://blog.zhouyiyan.cn/images/osprey-logo.png" alt="一言"></a>
            </div>
            
            <div class="col-xs-3 col-sm-2"><h3><a href="http://blog.zhouyiyan.cn/#about">About</a></h3></div>
            
            <div class="col-xs-3 col-sm-2"><h3><a href="http://blog.zhouyiyan.cn/#work">Work</a></h3></div>
            
            <div class="col-xs-3 col-sm-2"><h3><a href="http://blog.zhouyiyan.cn/#blog">Blog</a></h3></div>
            
            <div class="col-xs-3 col-sm-2"><h3><a href="http://blog.zhouyiyan.cn/#contact">Contact</a></h3></div>
            
            <div class="col-xs-6 col-sm-1 nav-toggle">
                <a href="" class="nav-icon" onclick="return false"><img src="http://blog.zhouyiyan.cn/images/icon-menu.png" alt="Open Menu"><img src="http://blog.zhouyiyan.cn/images/icon-x.png" alt="Close Menu" style="display: none;"></a>
            </div>
        </nav>
        <section class="nav-full row middle-xs center-xs">
            <div class="col-xs-12">
                <div class="row middle-xs center-xs">
                    
                    <div class="col-xs-12"><h1><a href="http://blog.zhouyiyan.cn/#about">About</a></h1></div>
                    
                    <div class="col-xs-12"><h1><a href="http://blog.zhouyiyan.cn/#work">Work</a></h1></div>
                    
                    <div class="col-xs-12"><h1><a href="http://blog.zhouyiyan.cn/#blog">Blog</a></h1></div>
                    
                    <div class="col-xs-12"><h1><a href="http://blog.zhouyiyan.cn/#contact">Contact</a></h1></div>
                    
                </div>
            </div>
        </section>
        <main>


    <section class="container">
        <section class="content">
            <h1> 利用Travis做持续构建测试 </h1>

            <div class="sub-header">
                October 2014 · 1 minute read
            </div>

            <div class="entry-content">
                <p>随着项目的规模不断增长，持续的构建测试能够有效的保障代码的质量。以前做Java的时候一直用Maven管理依赖，Jenkins自动化集成测试，Sonar监控代码质量。现在Go的项目，因为是放在Github上的关系，试用了下Travis。不得不说配置真心方便，yml几行代码就测试了Go从发布以来的四个版本（发现只支持到1.2+）。而且反应真的很灵敏，每次push代码，Travis都很勤恳的测试，有错误就发邮件通知我，搞的我现在每次push都很谨慎，生怕搞坏了build。</p>

<p>另外我还把构建的状态放到了Github项目的首页，看起来很专业嘛，嘻嘻。</p>

            </div>

            <div class="pagination">
                
                    <a href="http://blog.zhouyiyan.cn/blog/golucene-live-demo/">&laquo; 寻找哈姆雷特</a>
                
                
                    <a href="http://blog.zhouyiyan.cn/blog/aliyun-upgrade/">阿里云服务器升级 &raquo;</a>
                
            </div>
        </section>
        <br>
        <section class="disqus">
    <div id="disqus_thread"></div>
    <script type="text/javascript">
        (function() {
            
            
            if (window.location.hostname == "localhost")
                return;
            var disqus_shortname = 'zhouyiyan';
            var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
            dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';
            (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
        })();
    </script>
    <noscript>Please enable JavaScript to view comments powered by <a href="http://disqus.com/?ref_noscript">Disqus</a>.</noscript>
</section>

    </section>

        </main>
        <footer class="row middle-xs center-xs">
            
            <div class="col-xs-3 col-md-2"><a href="https://github.com/balzaczyy">GitHub</a></div>
            
            
            <div class="col-xs-3 col-md-2"><a href="https://linkedin.com/in/balzaczyy">LinkedIn</a></div>
            
            
            <div class="col-xs-3 col-md-2"><a href="https://twitter.com/balzaczyy">Twitter</a></div>
            
            
            <div class="col-xs-12">
                
                Copyright &copy; 2017 一言.
                
                
                Theme developed by <a href="https://tomanistor.com">Toma Nistor</a>.
                
            </div>
            
            
            <script src="https://code.jquery.com/jquery-3.2.1.min.js" integrity="sha256-hwg4gsxgFZhOsEEamdOYGBf13FyQuiTwlAQgxVSNgt4=" crossorigin="anonymous"></script>
            
            <script src="http://blog.zhouyiyan.cn/scripts/main.js" type="text/javascript"></script>
            
            <script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.10.0/highlight.min.js"></script>
        </footer>
    </body>
</html>

