diff --git a/.github/workflows/android-instrumented-data-tests.yml b/.github/workflows/android-instrumented-data-tests.yml new file mode 100644 index 00000000000..060b911f338 --- /dev/null +++ b/.github/workflows/android-instrumented-data-tests.yml @@ -0,0 +1,41 @@ +name: Android Instrumented Data Tests + +permissions: + contents: read + +on: + pull_request: + +jobs: + instrumented-tests: + name: Run Android Instrumented Data Tests + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Set up JDK 17 + uses: actions/setup-java@v4 + with: + java-version: '17' + distribution: 'temurin' + + - name: Enable KVM + 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: Run Instrumented Data Tests with emulator + uses: reactivecircus/android-emulator-runner@v2 + with: + api-level: 33 + target: google_apis + arch: x86_64 + profile: pixel + avd-name: instrumented-tests-avd + force-avd-creation: true + disable-animations: true + emulator-options: -no-window -no-audio -no-boot-anim -accel auto -memory 2048 + script: ./gradlew :ownCloudData:connectedAndroidTest diff --git a/.github/workflows/android-unit-tests.yml b/.github/workflows/android-unit-tests.yml index 1fc9bfec4a9..894d1d15c6d 100644 --- a/.github/workflows/android-unit-tests.yml +++ b/.github/workflows/android-unit-tests.yml @@ -1,12 +1,14 @@ name: Android Unit Tests +permissions: + contents: read + on: pull_request: - branches: - - "*" jobs: - unit_tests: + unit-tests: + name: Run Android Unit Tests runs-on: ubuntu-latest steps: diff --git a/CHANGELOG.md b/CHANGELOG.md index 0ca44fb4edc..70a97ec8647 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -52,6 +52,7 @@ ownCloud admins and users. * Enhancement - Shares space in Android native file explorer: [#4515](https://github.com/owncloud/android/issues/4515) * Enhancement - Accessibility reports in 4.5.1: [#4568](https://github.com/owncloud/android/issues/4568) * Enhancement - Support for Kiteworks servers without client secret: [#4588](https://github.com/owncloud/android/issues/4588) +* Enhancement - Integration of instrumented tests in GitHub Actions: [#4595](https://github.com/owncloud/android/issues/4595) * Enhancement - SBOM (Software Bill of Materials): [#4598](https://github.com/owncloud/android/issues/4598) ## Details @@ -187,6 +188,14 @@ ownCloud admins and users. https://github.com/owncloud/android/issues/4588 https://github.com/owncloud/android/pull/4589 +* Enhancement - Integration of instrumented tests in GitHub Actions: [#4595](https://github.com/owncloud/android/issues/4595) + + A new workflow has been added to run instrumented tests in GitHub Actions in + order to have a more consistent CI pipeline in the project. + + https://github.com/owncloud/android/issues/4595 + https://github.com/owncloud/android/pull/4602 + * Enhancement - SBOM (Software Bill of Materials): [#4598](https://github.com/owncloud/android/issues/4598) SBOM to be generated in every PR via GitHub Actions with the list of all diff --git a/changelog/unreleased/4602 b/changelog/unreleased/4602 new file mode 100644 index 00000000000..f73a0befc19 --- /dev/null +++ b/changelog/unreleased/4602 @@ -0,0 +1,7 @@ +Enhancement: Integration of instrumented tests in GitHub Actions + +A new workflow has been added to run instrumented tests in GitHub Actions +in order to have a more consistent CI pipeline in the project. + +https://github.com/owncloud/android/issues/4595 +https://github.com/owncloud/android/pull/4602