Skip to content

Commit

Permalink
chore: fix type and CI update (#1000)
Browse files Browse the repository at this point in the history
* ci: use GH Action for detecting LTS Node

* fix: type

* ci: tweak gha func tests
  • Loading branch information
KazuCocoa authored May 4, 2024
1 parent e24d46a commit 20287b7
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 8 deletions.
11 changes: 8 additions & 3 deletions .github/workflows/functional-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,14 @@ jobs:
if: steps.avd-cache.outputs.cache-hit != 'true'
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: ${{ matrix.apiLevel }}
avd-name: ${{ env.ANDROID_AVD }}
force-avd-creation: false
emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
disable-animations: false
api-level: ${{ matrix.apiLevel }}
disable-spellchecker: true
target: ${{ matrix.emuTag }}
emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim
arch: ${{ matrix.arch }}
disable-animations: true
script: echo "Generated AVD snapshot for caching."
- run: |
npm install -g appium
Expand Down Expand Up @@ -115,6 +119,7 @@ jobs:
api-level: ${{ matrix.apiLevel }}
disable-spellchecker: true
disable-animations: true
emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim
target: ${{ matrix.emuTag }}
arch: ${{ matrix.arch }}
- name: Save logcat output
Expand Down
18 changes: 14 additions & 4 deletions .github/workflows/unit-test.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,27 @@
name: Unit Tests

on: [pull_request, push]
on:
pull_request:
branches: [ master ]
paths-ignore:
- 'docs/**'
- '*.md'
push:
branches: [ master ]
paths-ignore:
- 'docs/**'
- '*.md'


jobs:
prepare_matrix:
runs-on: ubuntu-latest
outputs:
versions: ${{ steps.generate-matrix.outputs.versions }}
versions: ${{ steps.generate-matrix.outputs.active }}
steps:
- name: Select 3 most recent LTS versions of Node.js
- name: Select all active LTS versions of Node.js
id: generate-matrix
run: echo "versions=$(curl -s https://endoflife.date/api/nodejs.json | jq -c '[[.[] | select(.lts != false)][:3] | .[].cycle | tonumber]')" >> "$GITHUB_OUTPUT"
uses: msimerson/node-lts-versions@v1

node_test:
needs:
Expand Down
2 changes: 1 addition & 1 deletion lib/commands/execute.js
Original file line number Diff line number Diff line change
Expand Up @@ -130,5 +130,5 @@ export async function executeMobile (mobileCommand, opts = {}) {
throw new errors.UnknownCommandError(`Unknown mobile command "${mobileCommand}". ` +
`Only ${_.keys(mobileCommandsMapping)} commands are supported.`);
}
return await this[mobileCommandsMapping[mobileCommand]](opts);
return await this[/**@type {string}*/(mobileCommandsMapping[mobileCommand])](opts);
}

0 comments on commit 20287b7

Please sign in to comment.