-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtests.html
156 lines (133 loc) · 8.85 KB
/
tests.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.17: http://docutils.sourceforge.net/" />
<title>Notes for testing doctr — Doctr 1.8.0+13.g7e75711 documentation</title>
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="_static/alabaster.css" type="text/css" />
<script id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></script>
<script src="_static/jquery.js"></script>
<script src="_static/underscore.js"></script>
<script src="_static/doctools.js"></script>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="prev" title="Releasing" href="releasing.html" />
<link rel="stylesheet" href="_static/custom.css" type="text/css" />
<meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9" />
</head><body>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<section id="notes-for-testing-doctr">
<h1>Notes for testing doctr<a class="headerlink" href="#notes-for-testing-doctr" title="Permalink to this headline">¶</a></h1>
<section id="github-test-authentication">
<h2>GitHub Test Authentication<a class="headerlink" href="#github-test-authentication" title="Permalink to this headline">¶</a></h2>
<p>Many of the <code class="docutils literal notranslate"><span class="pre">doctr</span></code> tests in <code class="docutils literal notranslate"><span class="pre">doctr/tests/test_local.py</span></code> contact GitHub to
check that invalid repo names raise errors, etc. However, the GitHub API has a
hard limit of 60 requests / hour for unauthenticated requests and it is very
easy to run over this when pushing many changes.</p>
<p>In order to avoid this limit, there is a GitHub Personal Access Token stored in
the <code class="docutils literal notranslate"><span class="pre">doctr</span></code> Travis account that is available as the environment variable
<code class="docutils literal notranslate"><span class="pre">$TESTING_TOKEN</span></code>.</p>
<p>To regenerate / change this token, first go to <a class="reference external" href="https://github.com/settings/tokens">GitHub Settings</a> and create a Personal Access Token. Make
sure that all of the checkboxes are unchecked (this token should only have
privileges to check in with the GitHub API).</p>
<p>You can add the updated token to Travis on the <a class="reference external" href="https://travis-ci.org/drdoctr/doctr/settings">doctr Travis Settings Page</a>.</p>
<p>Paste the token string into the <code class="docutils literal notranslate"><span class="pre">Value</span></code> field and <code class="docutils literal notranslate"><span class="pre">TESTING_TOKEN</span></code> in the
<code class="docutils literal notranslate"><span class="pre">Name</span></code> field (unless you have changed this value in
<code class="docutils literal notranslate"><span class="pre">doctr/tests/test_local.py</span></code>).</p>
</section>
<section id="travis-ci-com-cs-travis-ci-org">
<h2>travis-ci.com cs. travis-ci.org<a class="headerlink" href="#travis-ci-com-cs-travis-ci-org" title="Permalink to this headline">¶</a></h2>
<p>Travis CI is <a class="reference external" href="https://blog.travis-ci.com/2018-05-02-open-source-projects-on-travis-ci-com-with-github-apps">migrating</a>
from .org to .com. While the migration is in place, it is possible to enable a
repository on both. However, the same repository on each will have different
public keys. Doctr presently only supports one at a time. On Travis itself,
there is little difference in the doctr code, but there is a lot of code in
<code class="docutils literal notranslate"><span class="pre">configure</span></code> to automatically determine which is enabled.</p>
<p>The repos:</p>
<ul class="simple">
<li><p><a class="reference external" href="https://github.com/drdoctr/testing-travis-ci-com">https://github.com/drdoctr/testing-travis-ci-com</a></p></li>
<li><p><a class="reference external" href="https://github.com/drdoctr/testing-travis-ci-org">https://github.com/drdoctr/testing-travis-ci-org</a></p></li>
<li><p><a class="reference external" href="https://github.com/drdoctr/testing-travis-ci-both">https://github.com/drdoctr/testing-travis-ci-both</a></p></li>
<li><p><a class="reference external" href="https://github.com/drdoctr/testing-travis-ci-neither">https://github.com/drdoctr/testing-travis-ci-neither</a></p></li>
</ul>
<p>Are enabled on Travis CI .com, .org, both, and neither. To enable a repo on
.org, go to <a class="reference external" href="https://travis-ci.org/organizations/drdoctr/repositories">https://travis-ci.org/organizations/drdoctr/repositories</a> and make
sure it is checked. To enable a repo on .com, go to the <a class="reference external" href="https://github.com/organizations/drdoctr/settings/installations/272524">Travis CI Apps
settings</a> on
GitHub, and make sure “only selected repositories” is enabled with those repos
that should be enabled.</p>
<p>There are automated tests in the test suite that check the function that
determines which of .org/.com it is enabled on, which test against these repos
(<code class="docutils literal notranslate"><span class="pre">test_check_repo_exists_org_com</span></code>).</p>
</section>
<section id="private-repositories">
<h2>Private Repositories<a class="headerlink" href="#private-repositories" title="Permalink to this headline">¶</a></h2>
<p>Doctr also supports private repositories on GitHub. GitHub allows free private
repositories, but they must be made on a user account, not the <code class="docutils literal notranslate"><span class="pre">drdoctr</span></code>
org.</p>
<p>To build a private repo, you have to use travis-ci.com. The free plan only
allows 100 builds, so you might have to make a new user to continue testing.
Unless we get a paid plan, testing should only be done manually, when
necessary.</p>
<p>GitHub does not allow GitHub pages on private repositories on the free plan,
but you can just manually verify that things are pushed to the <code class="docutils literal notranslate"><span class="pre">gh-pages</span></code>
branch.</p>
</section>
</section>
</div>
</div>
</div>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<h3><a href="index.html">Table of Contents</a></h3>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="index.html">Doctr</a></li>
<li class="toctree-l1"><a class="reference internal" href="commandline.html">Doctr Command Line Help</a></li>
<li class="toctree-l1"><a class="reference internal" href="recipes.html">Recipes</a></li>
<li class="toctree-l1"><a class="reference internal" href="api.html">API</a></li>
<li class="toctree-l1"><a class="reference internal" href="changelog.html">Doctr Changelog</a></li>
<li class="toctree-l1"><a class="reference internal" href="releasing.html">Releasing</a></li>
<li class="toctree-l1 current"><a class="current reference internal" href="#">Notes for testing doctr</a><ul>
<li class="toctree-l2"><a class="reference internal" href="#github-test-authentication">GitHub Test Authentication</a></li>
<li class="toctree-l2"><a class="reference internal" href="#travis-ci-com-cs-travis-ci-org">travis-ci.com cs. travis-ci.org</a></li>
<li class="toctree-l2"><a class="reference internal" href="#private-repositories">Private Repositories</a></li>
</ul>
</li>
</ul>
<h3>Need help?</h3>
<p>
Open an issue in our <a href="https://github.com/drdoctr/doctr/issues">issue
tracker</a>. Issues that are just questions are fine.
</p>
<div id="searchbox" style="display: none" role="search">
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="search.html" method="get">
<input type="text" name="q" aria-labelledby="searchlabel" />
<input type="submit" value="Go" />
</form>
</div>
</div>
<script>$('#searchbox').show(0);</script>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="footer">
©2016, Aaron Meurer and Gil Forsyth.
|
Powered by <a href="http://sphinx-doc.org/">Sphinx 3.5.3</a>
& <a href="https://github.com/bitprophet/alabaster">Alabaster 0.7.12</a>
|
<a href="_sources/tests.rst.txt"
rel="nofollow">Page source</a>
</div>
<a href="https://github.com/drdoctr/doctr" class="github">
<img style="position: absolute; top: 0; right: 0; border: 0;" src="https://s3.amazonaws.com/github/ribbons/forkme_right_darkblue_121621.png" alt="Fork me on GitHub" class="github"/>
</a>
</body>
</html>