Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
40ae524388 | ||
|
|
58a29ab093 | ||
|
|
a1d79c212a | ||
|
|
bc66906dc3 | ||
|
|
95902a7889 | ||
|
|
3f140fc2b1 |
@@ -81,7 +81,11 @@ jobs:
|
|||||||
|
|
||||||
- name: Verify the released artifacts
|
- name: Verify the released artifacts
|
||||||
run: |
|
run: |
|
||||||
APK=$(ls app/build/outputs/apk/release/*.apk | head -1)
|
# A glob, not `ls | head`: the glob is already here, and parsing ls is what
|
||||||
|
# SC2012 is about. Gradle's names have no spaces today, which is exactly the
|
||||||
|
# kind of assumption that holds until it does not.
|
||||||
|
apks=(app/build/outputs/apk/release/*.apk)
|
||||||
|
APK="${apks[0]}"
|
||||||
# A release that shipped one ABI, or lost 16 KB alignment, would install
|
# A release that shipped one ABI, or lost 16 KB alignment, would install
|
||||||
# fine on a test device and fail for users or at Play submission. Both are
|
# fine on a test device and fail for users or at Play submission. Both are
|
||||||
# cheap to check and expensive to discover later.
|
# cheap to check and expensive to discover later.
|
||||||
|
|||||||
@@ -182,6 +182,23 @@ jobs:
|
|||||||
docker run --rm "$SHELLCHECK" --version
|
docker run --rm "$SHELLCHECK" --version
|
||||||
git ls-files -z '*.sh' | xargs -0 -r docker run --rm -v "$PWD:/mnt" "$SHELLCHECK"
|
git ls-files -z '*.sh' | xargs -0 -r docker run --rm -v "$PWD:/mnt" "$SHELLCHECK"
|
||||||
|
|
||||||
|
# actionlint closes the half shellcheck cannot see. The step above reads .sh files;
|
||||||
|
# a good deal of this repo's bash lives in inline `run:` blocks instead -- the release
|
||||||
|
# verification here, the emulator setup and teardown in this file and in
|
||||||
|
# api37-debug.yml. actionlint parses each workflow and runs shellcheck over every
|
||||||
|
# `run:`, on top of its own checks for expression syntax, `needs:` references, matrix
|
||||||
|
# keys and action input names.
|
||||||
|
#
|
||||||
|
# Pinned by digest for the same reason shellcheck is, and with a second reason of its
|
||||||
|
# own: actionlint's documented install is `bash <(curl -s .../download-actionlint.bash)`
|
||||||
|
# off a moving branch, which would sit badly in a repo that pins every action by SHA.
|
||||||
|
- name: actionlint
|
||||||
|
env:
|
||||||
|
ACTIONLINT: rhysd/actionlint@sha256:9d36088643581e728c969f35141f88139fec77280b2be23c1f66f8e40e1025e7
|
||||||
|
run: |
|
||||||
|
docker run --rm "$ACTIONLINT" -version
|
||||||
|
docker run --rm -v "$PWD:/repo" -w /repo "$ACTIONLINT" -color
|
||||||
|
|
||||||
# `!cancelled()` rather than a plain sequence: a shellcheck failure above must not
|
# `!cancelled()` rather than a plain sequence: a shellcheck failure above must not
|
||||||
# cost the ktlint/detekt/lint lists. Same reason this step passes --continue -- one
|
# cost the ktlint/detekt/lint lists. Same reason this step passes --continue -- one
|
||||||
# round trip should produce every list, not stop at the first.
|
# round trip should produce every list, not stop at the first.
|
||||||
|
|||||||
@@ -185,11 +185,12 @@ install for code that can never run — and on API 37 the full APK does not fit
|
|||||||
`podman run --rm -v "$PWD:/mnt:z" docker.io/koalaman/shellcheck@sha256:61862eba... <files>`
|
`podman run --rm -v "$PWD:/mnt:z" docker.io/koalaman/shellcheck@sha256:61862eba... <files>`
|
||||||
(the digest is in `status_check.yml`; there is no shellcheck system package on this host).
|
(the digest is in `status_check.yml`; there is no shellcheck system package on this host).
|
||||||
|
|
||||||
**It does not cover inline `run:` blocks in the workflows**, and a good deal of this repo's bash
|
**`actionlint` covers the half shellcheck cannot see** — the inline `run:` blocks, where a good
|
||||||
lives there. `actionlint` does cover them — it runs shellcheck over each `run:` — and reports one
|
deal of this repo's bash lives. It runs shellcheck over each `run:` plus its own checks on
|
||||||
pre-existing `info` finding in `build.yml`. It is not wired in because every action here is
|
expression syntax, `needs:` references, matrix keys and action inputs. It sits in the same job,
|
||||||
pinned by SHA, and actionlint's usual installer is a `curl | bash` off a moving branch; doing it
|
**pinned by digest** for the reason above and one of its own: its documented installer is a
|
||||||
properly means pinning a container digest. Tracked separately rather than bolted on.
|
`curl | bash` off a moving branch, which does not belong in a repo that pins every action by SHA.
|
||||||
|
Locally: `podman run --rm -v "$PWD:/repo:z" -w /repo docker.io/rhysd/actionlint@sha256:9d360886... -color`.
|
||||||
|
|
||||||
## Dependency versions
|
## Dependency versions
|
||||||
|
|
||||||
|
|||||||
+7
-1
@@ -140,10 +140,16 @@ class ConversionViewModelProbeFailureTest {
|
|||||||
private fun pickedProbe(): InputProbe? {
|
private fun pickedProbe(): InputProbe? {
|
||||||
val viewModel = ConversionViewModel(app, Dispatchers.Unconfined)
|
val viewModel = ConversionViewModel(app, Dispatchers.Unconfined)
|
||||||
viewModel.onInputPicked(INPUT)
|
viewModel.onInputPicked(INPUT)
|
||||||
|
// The predicate is the guard, and it is the only one needed. It requires `Ready`, so a
|
||||||
|
// pick that ended in `Failed` never satisfies it and `awaitState` fails on its timeout
|
||||||
|
// naming what it was waiting for -- "Ready with a probe" -- which says more than a
|
||||||
|
// separate assertion could. A `ready as? ConversionState.Failed` check used to sit here
|
||||||
|
// and was dead: `Ready` and `Failed` are sibling subtypes of one sealed interface, so
|
||||||
|
// the cast was always null and the assertNull could never fire. Measured, not assumed --
|
||||||
|
// flipping it to assertNotNull failed all three callers of this helper.
|
||||||
val ready = awaitState(viewModel.state, "Ready with a probe") {
|
val ready = awaitState(viewModel.state, "Ready with a probe") {
|
||||||
it is ConversionState.Ready && it.input.probe != null
|
it is ConversionState.Ready && it.input.probe != null
|
||||||
}
|
}
|
||||||
assertNull("nothing here should reach a terminal failure", (ready as? ConversionState.Failed))
|
|
||||||
return (ready as ConversionState.Ready).input.probe
|
return (ready as ConversionState.Ready).input.probe
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user