Skip to content

Commit

Permalink
ci: Update functional tests execution env (#733)
Browse files Browse the repository at this point in the history
  • Loading branch information
mykola-mokhnach committed May 3, 2024
1 parent 02678f3 commit 3045ead
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 15 deletions.
19 changes: 9 additions & 10 deletions .github/workflows/functional-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,14 @@ jobs:
ANDROID_SDK_VERSION: "${{ matrix.apiLevel }}"
PLATFORM_VERSION: "${{ matrix.platformVersion }}"
EMU_TAG: "${{ matrix.emuTag }}"
# No hardware acceleration is available for emulators on Ubuntu:
# https://github.com/marketplace/actions/android-emulator-runner#can-i-use-this-action-on-linux-vms
runs-on: macos-latest
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Enable KVM group perms
run: |
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
sudo udevadm control --reload-rules
sudo udevadm trigger --name-match=kvm
- uses: actions/setup-node@v3
with:
node-version: lts/*
Expand All @@ -52,7 +55,7 @@ jobs:
- uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '11'
java-version: '17'
- name: AVD cache
uses: actions/cache@v3
id: avd-cache
Expand All @@ -69,14 +72,12 @@ jobs:
script: echo "Generated AVD snapshot for caching."
avd-name: $ANDROID_AVD
force-avd-creation: false
sdcard-path-or-size: 1500M
api-level: ${{ matrix.apiLevel }}
disable-spellchecker: true
target: ${{ matrix.emuTag }}
emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim
arch: ${{ matrix.arch }}
ram-size: 4096M
heap-size: 1024M
disable-animations: true
- run: nohup adb logcat > logcat.log &
name: Capture Logcat
- uses: reactivecircus/android-emulator-runner@v2
Expand All @@ -85,14 +86,12 @@ jobs:
script: npm run e2e-test
avd-name: $ANDROID_AVD
force-avd-creation: false
sdcard-path-or-size: 1500M
api-level: ${{ matrix.apiLevel }}
disable-spellchecker: true
target: ${{ matrix.emuTag }}
emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim
arch: ${{ matrix.arch }}
ram-size: 4096M
heap-size: 1024M
disable-animations: true
- name: Save logcat output
if: ${{ always() }}
uses: actions/upload-artifact@master
Expand Down
9 changes: 4 additions & 5 deletions .github/workflows/unit-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,11 @@ 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

test:
needs:
Expand All @@ -22,7 +21,7 @@ jobs:
node-version: ${{ fromJSON(needs.prepare_matrix.outputs.versions) }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
Expand Down

0 comments on commit 3045ead

Please sign in to comment.