Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: use ubuntu-latest for functional tests. Improve CI caching #107

Merged
merged 6 commits into from
Jan 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ jobs:
with:
java-version: '17'
distribution: 'temurin'
cache: gradle
- name: Build library
run: ./gradlew :parsely:assembleDebug
- name: Publish to Maven Central Repository
Expand Down
40 changes: 35 additions & 5 deletions .github/workflows/readme.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ jobs:
with:
java-version: '17'
distribution: 'temurin'
cache: gradle
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
- name: Build library
run: ./gradlew :parsely:assembleDebug
- name: Build example app
Expand Down Expand Up @@ -44,7 +45,7 @@ jobs:
name: artifact
path: ~/.m2/repository/com/parsely/parsely/*
functional-tests:
runs-on: macos-latest
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
Expand All @@ -54,9 +55,37 @@ jobs:
with:
java-version: '17'
distribution: 'temurin'
cache: gradle
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
- 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
- name: AVD cache
uses: actions/cache@v3
id: avd-cache
with:
path: |
~/.android/avd/*
~/.android/adb*
key: avd
- name: Create AVD and generate snapshot for caching
if: steps.avd-cache.outputs.cache-hit != 'true'
uses: reactivecircus/android-emulator-runner@v2
with:
working-directory: .
api-level: 31
profile: Nexus 6
arch: x86_64
force-avd-creation: false
avd-name: macOS-avd-x86_64-31
emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
disable-animations: true
disk-size: 4096M
script: echo "Generated AVD snapshot for caching."
- name: Functional Tests
uses: reactivecircus/android-emulator-runner@v2.28.0
uses: reactivecircus/android-emulator-runner@v2
with:
working-directory: .
api-level: 31
Expand All @@ -66,7 +95,8 @@ jobs:
avd-name: macOS-avd-x86_64-31
emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
disable-animations: true
script: ./gradlew :parsely:connectedDebugAndroidTest
disk-size: 4096M
script: adb uninstall "com.parsely.parselyandroid.test"; ./gradlew :parsely:connectedDebugAndroidTest
- name: Publish build artifacts
uses: actions/upload-artifact@v3
if: always()
Expand Down
3 changes: 0 additions & 3 deletions .github/workflows/submit-gradle-dependencies.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
name: Submit dependencies to GitHub Dependency Graph
on:
push:
branches:
- main
- release/*
permissions:
contents: write
jobs:
Expand Down