Skip to content

Commit

Permalink
Fix CI scripts (#12)
Browse files Browse the repository at this point in the history
  • Loading branch information
pedroql authored Jul 29, 2020
1 parent ef78495 commit b1f641c
Show file tree
Hide file tree
Showing 9 changed files with 140 additions and 11 deletions.
16 changes: 11 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build (Compile, lint, checkApi, test, etc)
run: ./gradlew --no-daemon build
run: ./gradlew build
- name: Archive build reports artifacts
if: always()
uses: actions/upload-artifact@v2
Expand All @@ -42,15 +42,21 @@ jobs:
- name: Ensure documentation is up to date
id: doc-check
run: |
./gradlew --no-daemon dokka
./gradlew dokka
# the next command will list documentation files out of date. Please run ./gradlew dokka
git diff --exit-code --name-only
git diff --exit-code --name-only || echo ::set-output name=status::failure
- name: Check which documentation files have changed
if: steps.doc-check.outcome == 'failure'
if: steps.doc-check.outputs.status == 'failure'
run: git diff > git-diff.txt
- name: Upload diff artifact of the documentation files
uses: actions/upload-artifact@v2
if: steps.doc-check.outcome == 'failure'
if: steps.doc-check.outputs.status == 'failure'
with:
name: git-diff
path: git-diff.txt
- name: Fail build due to documentation being out of date
if: steps.doc-check.outputs.status == 'failure'
run: |
rm git-diff.txt
echo Documentation is out of date, you need to run ./gradlew dokka and try again. The following files have changed:
git diff --exit-code --name-only
5 changes: 3 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build (Compile, lint, checkApi, test, etc)
run: ./gradlew --no-daemon -DVERSION_OVERRIDE=${{ steps.parse_tag.outputs.VERSION }} build
run: ./gradlew -DVERSION_OVERRIDE=${{ steps.parse_tag.outputs.VERSION }} build
- name: Archive build reports artifacts
if: always()
uses: actions/upload-artifact@v2
Expand All @@ -47,7 +47,7 @@ jobs:
- name: Ensure documentation is up to date
id: doc-check
run: |
./gradlew --no-daemon dokka
./gradlew dokka
# the next command will list documentation files out of date. Please run ./gradlew dokka
git diff --exit-code --name-only || echo ::set-output name=status::failure
- name: Check which documentation files have changed
Expand All @@ -60,6 +60,7 @@ jobs:
name: git-diff
path: git-diff.txt
- name: Fail build due to documentation being out of date
if: steps.doc-check.outputs.status == 'failure'
run: |
rm git-diff.txt
echo Documentation is out of date, you need to run ./gradlew dokka and try again. The following files have changed:
Expand Down
20 changes: 18 additions & 2 deletions documentation/mvflow/net.pedroloureiro.mvflow/-m-v-flow.html

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<HTML>
<HEAD>
<meta charset="UTF-8">
<title>MVFlow.View2.actions - mvflow</title>
<link rel="stylesheet" href="../../../../style.css">
</HEAD>
<BODY>
<a href="../../../index.html">mvflow</a>&nbsp;/&nbsp;<a href="../../index.html">net.pedroloureiro.mvflow</a>&nbsp;/&nbsp;<a href="../index.html">MVFlow</a>&nbsp;/&nbsp;<a href="index.html">View2</a>&nbsp;/&nbsp;<a href="./actions.html">actions</a><br/>
<br/>
<h1>actions</h1>
<a name="net.pedroloureiro.mvflow.MVFlow.View2$actions()"></a>
<code><span class="keyword">abstract</span> <span class="keyword">fun </span><span class="identifier">actions</span><span class="symbol">(</span><span class="symbol">)</span><span class="symbol">: </span><a href="https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines.flow/-flow/index.html"><span class="identifier">Flow</span></a><span class="symbol">&lt;</span><span class="identifier">Action</span><span class="symbol">&gt;</span></code> <a href="https://github.com/pedroql/mvflow/blob/master/mvflow-core/src/main/kotlin/net/pedroloureiro/mvflow/MVFlow.kt#L164">(source)</a>
<p>Function to return a <a href="https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines.flow/-flow/index.html">kotlinx.coroutines.flow.Flow</a> of the actions that the user makes inside this view.</p>
<p>You can create this in many ways, one suggestion is using
<a href="https://github.com/ReactiveCircus/FlowBinding">FlowBinding</a> or doing it yourself like in this sample:</p>
<pre><code class="lang-kotlin">class MyActivity : AppCompatActivity(), MVFlow.View&lt;State&gt; {
// could also be a Fragment, or a plain class you created.
private val actionChannel = Channel&lt;Action&gt;()

fun setupUi() {
swipeRefreshLayout.setOnRefreshListener {
actionChannel.offer(Action.Load)
}
}

override fun actions() = actionChannel.consumeAsFlow()
}</code></pre>
</BODY>
</HTML>
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
<HTML>
<HEAD>
<meta charset="UTF-8">
<title>MVFlow.View2 - mvflow</title>
<link rel="stylesheet" href="../../../../style.css">
</HEAD>
<BODY>
<a href="../../../index.html">mvflow</a>&nbsp;/&nbsp;<a href="../../index.html">net.pedroloureiro.mvflow</a>&nbsp;/&nbsp;<a href="../index.html">MVFlow</a>&nbsp;/&nbsp;<a href="./index.html">View2</a><br/>
<br/>
<h1>View2</h1>
<code><span class="keyword">interface </span><span class="identifier">View2</span><span class="symbol">&lt;</span><span class="identifier">State</span><span class="symbol">, </span><span class="identifier">Action</span><span class="symbol">&gt;</span></code> <a href="https://github.com/pedroql/mvflow/blob/master/mvflow-core/src/main/kotlin/net/pedroloureiro/mvflow/MVFlow.kt#L150">(source)</a>
<p>An interface for a View used in MVFlow.</p>
<h3>Parameters</h3>
<p><a name="State"></a>
<code>State</code> - a class that defines what this class shows.</p>
<p><a name="Action"></a>
<code>Action</code> - a class, usually a sealed class, that contains the information about all the interactions that can
happen inside this view.</p>
<h3>Functions</h3>
<table>
<tbody>
<tr>
<td>
<h4><a href="actions.html">actions</a></h4>
</td>
<td>
<p>Function to return a <a href="https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines.flow/-flow/index.html">kotlinx.coroutines.flow.Flow</a> of the actions that the user makes inside this view.</p>
<code><span class="keyword">abstract</span> <span class="keyword">fun </span><span class="identifier">actions</span><span class="symbol">(</span><span class="symbol">)</span><span class="symbol">: </span><a href="https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines.flow/-flow/index.html"><span class="identifier">Flow</span></a><span class="symbol">&lt;</span><span class="identifier">Action</span><span class="symbol">&gt;</span></code></td>
</tr>
<tr>
<td>
<h4><a href="render.html">render</a></h4>
</td>
<td>
<p>Function that renders the UI based on <a href="render.html#net.pedroloureiro.mvflow.MVFlow.View2$render(net.pedroloureiro.mvflow.MVFlow.View2.State)/state">state</a>.</p>
<code><span class="keyword">abstract</span> <span class="keyword">fun </span><span class="identifier">render</span><span class="symbol">(</span><span class="identifier" id="net.pedroloureiro.mvflow.MVFlow.View2$render(net.pedroloureiro.mvflow.MVFlow.View2.State)/state">state</span><span class="symbol">:</span>&nbsp;<span class="identifier">State</span><span class="symbol">)</span><span class="symbol">: </span><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html"><span class="identifier">Unit</span></a></code></td>
</tr>
</tbody>
</table>
</BODY>
</HTML>
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<HTML>
<HEAD>
<meta charset="UTF-8">
<title>MVFlow.View2.render - mvflow</title>
<link rel="stylesheet" href="../../../../style.css">
</HEAD>
<BODY>
<a href="../../../index.html">mvflow</a>&nbsp;/&nbsp;<a href="../../index.html">net.pedroloureiro.mvflow</a>&nbsp;/&nbsp;<a href="../index.html">MVFlow</a>&nbsp;/&nbsp;<a href="index.html">View2</a>&nbsp;/&nbsp;<a href="./render.html">render</a><br/>
<br/>
<h1>render</h1>
<a name="net.pedroloureiro.mvflow.MVFlow.View2$render(net.pedroloureiro.mvflow.MVFlow.View2.State)"></a>
<code><span class="keyword">abstract</span> <span class="keyword">fun </span><span class="identifier">render</span><span class="symbol">(</span><span class="identifier" id="net.pedroloureiro.mvflow.MVFlow.View2$render(net.pedroloureiro.mvflow.MVFlow.View2.State)/state">state</span><span class="symbol">:</span>&nbsp;<span class="identifier">State</span><span class="symbol">)</span><span class="symbol">: </span><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html"><span class="identifier">Unit</span></a></code> <a href="https://github.com/pedroql/mvflow/blob/master/mvflow-core/src/main/kotlin/net/pedroloureiro/mvflow/MVFlow.kt#L154">(source)</a>
<p>Function that renders the UI based on <a href="render.html#net.pedroloureiro.mvflow.MVFlow.View2$render(net.pedroloureiro.mvflow.MVFlow.View2.State)/state">state</a>.</p>
</BODY>
</HTML>
Loading

0 comments on commit b1f641c

Please sign in to comment.
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy