Skip to content

Commit

Permalink
ci: Update e2e pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
mykola-mokhnach committed May 3, 2024
1 parent a7190b0 commit 5ac9083
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 9 deletions.
40 changes: 36 additions & 4 deletions .github/workflows/functional-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,19 @@ jobs:
- platformVersion: "11.0"
apiLevel: 30
emuTag: google_apis
arch: x86
- platformVersion: "9.0"
apiLevel: 28
emuTag: default
arch: x86
- platformVersion: "7.1"
apiLevel: 25
emuTag: default
arch: x86
- platformVersion: "5.1"
apiLevel: 22
emuTag: default
arch: x86

env:
CI: true
Expand All @@ -32,11 +36,14 @@ jobs:
PLATFORM_VERSION: ${{ matrix.platformVersion }}
EMU_TAG: ${{ matrix.emuTag }}
_FORCE_LOGS: 1
# 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 @@ -47,17 +54,42 @@ jobs:
with:
distribution: 'temurin'
java-version: '17'
- name: AVD cache
uses: actions/cache@v3
id: avd-cache
with:
path: |
~/.android/avd/*
~/.android/adb*
key: avd-${{ matrix.apiLevel }}
# https://github.com/marketplace/actions/android-emulator-runner
- uses: reactivecircus/android-emulator-runner@v2
if: steps.avd-cache.outputs.cache-hit != 'true'
name: Generate AVD snapshot for caching
with:
script: echo "Generated AVD snapshot for caching."
avd-name: ${{ env.ANDROID_AVD }}
force-avd-creation: 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
- run: nohup adb logcat > logcat.log &
name: Capture Logcat
- uses: reactivecircus/android-emulator-runner@v2
name: e2e_api${{ matrix.apiLevel }}
with:
script: scripts/e2e.sh
avd-name: ${{ env.ANDROID_AVD }}
sdcard-path-or-size: 1500M
force-avd-creation: false
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 }}
disable-animations: true
- name: Save logcat output
if: ${{ always() }}
uses: actions/upload-artifact@master
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/unit-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +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

node_test:
needs:
Expand All @@ -21,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 All @@ -33,7 +33,7 @@ jobs:
java_test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: lts/*
Expand Down

0 comments on commit 5ac9083

Please sign in to comment.