Commit 8b088a6a authored by Cyril L'Orphelin's avatar Cyril L'Orphelin
Browse files

MAJ Mardown > code tabulations

parent 8ee7dabe
......@@ -177,27 +177,29 @@
<details>
<summary>Solution </summary>
<pre class=" language-yaml" tabindex="0"><code class=" language-yaml"><span class="token key atrule">image</span><span class="token punctuation">:</span> python<span class="token punctuation">:</span><span class="token number">3</span>
<span class="token key atrule">stages</span><span class="token punctuation">:</span>
<span class="token punctuation">-</span> lint
<span class="token punctuation">-</span> test
<span class="token key atrule">job_lint</span><span class="token punctuation">:</span>
<span class="token key atrule">stage</span><span class="token punctuation">:</span> lint
<span class="token key atrule">script</span><span class="token punctuation">:</span>
<span class="token punctuation">-</span> pip install pylint
<span class="token punctuation">-</span> cd TP5/src
<span class="token punctuation">-</span> pylint tri
<span class="token key atrule">allow_failure</span><span class="token punctuation">:</span> <span class="token boolean important">true</span>
<span class="token key atrule">job_test</span><span class="token punctuation">:</span>
<span class="token key atrule">stage</span><span class="token punctuation">:</span> test
<span class="token key atrule">script</span><span class="token punctuation">:</span>
<span class="token punctuation">-</span> cd TP5/src
<span class="token punctuation">-</span> python <span class="token punctuation">-</span>m unittest tri_test
</code>
image: python:3
stages:
- lint
- test
job_lint:
stage: lint
script:
- pip install pylint
- cd TP5/src
- pylint tri
allow_failure: true
job_test:
stage: test
script:
- cd TP5/src
- python -m unittest tri_test
</details>
</pre>
* * *
......@@ -211,28 +213,29 @@
<details>
<summary>Solution coverage</summary>
<pre class=" language-yaml" tabindex="0"><code class=" language-yaml"><span class="token key atrule">image</span> <span class="token punctuation">:</span> python<span class="token punctuation">:</span><span class="token number">3</span>
<span class="token key atrule">stages</span> <span class="token punctuation">:</span>
<span class="token punctuation">-</span> lint
<span class="token punctuation">-</span> test
<span class="token punctuation">-</span> deploy
<span class="token key atrule">job_lint</span> <span class="token punctuation">:</span>
<span class="token key atrule">stage</span><span class="token punctuation">:</span> lint
<span class="token key atrule">script</span><span class="token punctuation">:</span>
<span class="token punctuation">-</span> pip install pylint
<span class="token punctuation">-</span> cd TP5/src
<span class="token punctuation">-</span> pylint tri
<span class="token key atrule">allow_failure</span><span class="token punctuation">:</span> <span class="token boolean important">true</span>
<span class="token key atrule">job_test</span> <span class="token punctuation">:</span>
<span class="token key atrule">stage</span><span class="token punctuation">:</span> test
<span class="token key atrule">script</span><span class="token punctuation">:</span>
<span class="token punctuation">-</span> pip install coverage
<span class="token punctuation">-</span> cd TP5/src
<span class="token punctuation">-</span> echo " " <span class="token important">&amp;&amp;</span> echo "<span class="token punctuation">-</span><span class="token punctuation">-</span> Performance tests from tri.py <span class="token punctuation">-</span><span class="token punctuation">-</span>" <span class="token important">&amp;&amp;</span> coverage run tri.py
<span class="token punctuation">-</span> echo " " <span class="token important">&amp;&amp;</span> echo "<span class="token punctuation">-</span><span class="token punctuation">-</span> Coverage Report via Unit Tests <span class="token punctuation">-</span><span class="token punctuation">-</span>" <span class="token important">&amp;&amp;</span> coverage run <span class="token punctuation">-</span>m unittest tri_test.py <span class="token important">&amp;&amp;</span> coverage report <span class="token punctuation">-</span>m <span class="token punctuation">-</span><span class="token punctuation">-</span>omit=tri_test.py
</code></pre>
image : python:3
stages :
- lint
- test
- deploy
job_lint :
stage: lint
script:
- pip install pylint
- cd TP5/src
- pylint tri
allow_failure: true
job_test :
stage: test
script:
- pip install coverage
- cd TP5/src
- echo " " && echo "-- Performance tests from tri.py --" && coverage run tri.py
- echo " " && echo "-- Coverage Report via Unit Tests --" && coverage run -m unittest tri_test.py && coverage report -m --omit=tri_test.py
</details>
<details>
......@@ -264,36 +267,37 @@
<details>
<summary>Solution</summary>
<pre class=" language-yaml" tabindex="0"><code class=" language-yaml"><span class="token key atrule">image</span> <span class="token punctuation">:</span> python<span class="token punctuation">:</span><span class="token number">3</span>
<span class="token key atrule">stages</span> <span class="token punctuation">:</span>
<span class="token punctuation">-</span> lint
<span class="token punctuation">-</span> test
<span class="token punctuation">-</span> deploy
<span class="token key atrule">job_lint</span> <span class="token punctuation">:</span>
<span class="token key atrule">stage</span><span class="token punctuation">:</span> lint
<span class="token key atrule">script</span><span class="token punctuation">:</span>
<span class="token punctuation">-</span> pip install pylint
<span class="token punctuation">-</span> cd TP5/src
<span class="token punctuation">-</span> pylint tri
<span class="token key atrule">allow_failure</span><span class="token punctuation">:</span> <span class="token boolean important">true</span>
<span class="token key atrule">job_test</span> <span class="token punctuation">:</span>
<span class="token key atrule">stage</span><span class="token punctuation">:</span> test
<span class="token key atrule">script</span><span class="token punctuation">:</span>
<span class="token punctuation">-</span> pip install coverage
<span class="token punctuation">-</span> cd TP5/src
<span class="token punctuation">-</span> echo " " <span class="token important">&amp;&amp;</span> echo "<span class="token punctuation">-</span><span class="token punctuation">-</span> Performance tests from tri.py <span class="token punctuation">-</span><span class="token punctuation">-</span>" <span class="token important">&amp;&amp;</span> coverage run tri.py
<span class="token punctuation">-</span> echo " " <span class="token important">&amp;&amp;</span> echo "<span class="token punctuation">-</span><span class="token punctuation">-</span> Coverage Report via Unit Tests <span class="token punctuation">-</span><span class="token punctuation">-</span>" <span class="token important">&amp;&amp;</span> coverage run <span class="token punctuation">-</span>m unittest tri_test.py <span class="token important">&amp;&amp;</span> coverage report <span class="token punctuation">-</span>m <span class="token punctuation">-</span><span class="token punctuation">-</span>omit=tri_test.py
<span class="token key atrule">pages</span><span class="token punctuation">:</span>
<span class="token key atrule">stage</span><span class="token punctuation">:</span> deploy
<span class="token key atrule">script</span><span class="token punctuation">:</span>
<span class="token punctuation">-</span> pip install sphinx <span class="token punctuation">-</span>U
<span class="token punctuation">-</span> pip install sphinx<span class="token punctuation">-</span>rtd<span class="token punctuation">-</span>theme
<span class="token punctuation">-</span> sphinx<span class="token punctuation">-</span>build <span class="token punctuation">-</span>b html TP5/documentation public
<span class="token key atrule">artifacts</span><span class="token punctuation">:</span>
<span class="token key atrule">paths</span><span class="token punctuation">:</span>
<span class="token punctuation">-</span> public
</code></pre>
image : python:3
stages :
- lint
- test
- deploy
job_lint :
stage: lint
script:
- pip install pylint
- cd TP5/src
- pylint tri
allow_failure: true
job_test :
stage: test
script:
- pip install coverage
- cd TP5/src
- echo " " && echo "-- Performance tests from tri.py --" && coverage run tri.py
- echo " " && echo "-- Coverage Report via Unit Tests --" && coverage run -m unittest tri_test.py && coverage report -m --omit=tri_test.py
pages:
stage: deploy
script:
- pip install sphinx -U
- pip install sphinx-rtd-theme
- sphinx-build -b html TP5/documentation public
artifacts:
paths:
- public
</details>
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment