Site updated at 2017-02-22 08:45:40 UTC
This commit is contained in:
parent
7a3cc6231f
commit
f402a25638
24 changed files with 70 additions and 37 deletions
|
@ -231,6 +231,39 @@ git push origin master
|
|||
|
||||
<p>Every time you run this script, you will be prompted for a comment to describe the change(s) that you are commiting. This comment will be displayed beside each changed file on GitHub and will be stored after each commit. You will also be asked to enter your GitHub username and password (or ssh key passphrase if you use <a href="https://help.github.com/categories/ssh/">GitHub with ssh</a>).</p>
|
||||
|
||||
<h3><a class="title-link" name="step-7-configuration-file-testing" href="#step-7-configuration-file-testing"></a> Step 7: Configuration file testing</h3>
|
||||
|
||||
<p><a href="https://travis-ci.org">Travis CI</a> is a continuous intigration testing system that runs every time the code in your repository is updated and allows you to validate that your code works on a fresh install.</p>
|
||||
|
||||
<ul>
|
||||
<li><a href="https://travis-ci.org/auth">Authorise Travis CI</a> to have access to your github repos.</li>
|
||||
<li>Create the build script that travis will run to test your repo.</li>
|
||||
<li>Create a dummy secrets.yaml for Travis.</li>
|
||||
</ul>
|
||||
|
||||
<p>Example .travis.yml</p>
|
||||
<div class="language-yaml highlighter-rouge"><pre class="highlight"><code><span class="s">language</span><span class="pi">:</span> <span class="s">python</span>
|
||||
<span class="s">python</span><span class="pi">:</span>
|
||||
<span class="pi">-</span> <span class="s2">"</span><span class="s">3.4"</span>
|
||||
<span class="s">before_install</span><span class="pi">:</span>
|
||||
<span class="pi">-</span> <span class="s">mv travis_secrets.yaml secrets.yaml</span>
|
||||
<span class="s">install</span><span class="pi">:</span>
|
||||
<span class="pi">-</span> <span class="s">pip3 install homeassistant</span>
|
||||
<span class="s">script</span><span class="pi">:</span>
|
||||
<span class="pi">-</span> <span class="s">hass -c . --script check_config</span>
|
||||
</code></pre>
|
||||
</div>
|
||||
|
||||
<p>Since the secrets.yaml should <em>not</em> be stored in your repo for security reasons, you won’t be able to access it at build time. Creating a dummy secrets.yaml is as simple as creating a new file that mimics your existing secrets.yaml with the required keys, but not their value.</p>
|
||||
|
||||
<div class="language-yaml highlighter-rouge"><pre class="highlight"><code><span class="c1">#travis_secrets.yaml</span>
|
||||
<span class="s">http_api</span><span class="pi">:</span> <span class="s">000000000000000000000000</span>
|
||||
<span class="s">home_latitude</span><span class="pi">:</span> <span class="s">00.00000</span>
|
||||
<span class="s">home_longitude</span><span class="pi">:</span> <span class="s">00.0000</span>
|
||||
<span class="s">home_elevation</span><span class="pi">:</span> <span class="s">0</span>
|
||||
</code></pre>
|
||||
</div>
|
||||
|
||||
<h3><a class="title-link" name="extra-commands" href="#extra-commands"></a> Extra commands</h3>
|
||||
|
||||
<p>You can enter these commands to get a list of the files in your local git repository and a status of files that have changed but not commited yet:</p>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue