Bump kotlinGradlePlugin from 2.1.0 to 2.1.10 #625
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: pull request | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
env: | |
BRANCH_NAME: ${{ github.head_ref || github.ref_name }} | |
jobs: | |
env-job: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ ubuntu-latest ] | |
outputs: | |
modified-branch-name: ${{ steps.env.outputs.MODIFIED_BRANCH_NAME }} | |
name: Modify branch name | |
steps: | |
- name: Sets MODIFIED_BRANCH_NAME | |
id: env | |
env: | |
name: "${{env.BRANCH_NAME}}" | |
run: | | |
echo "MODIFIED_BRANCH_NAME=${name//\//-}" >> ${GITHUB_OUTPUT} | |
cat ${GITHUB_OUTPUT} | |
build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ ubuntu-22.04 ] | |
api: [ 28 ] | |
abi: [ x86_64 ] | |
tag: [ default ] | |
emulatorApi: [ 9 ] | |
java_version: [ 17 ] | |
needs: | |
- env-job | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
submodules: true | |
- name: show envs | |
run: | | |
echo ${{ needs.env-job.outputs.modified-branch-name }} | |
- uses: gradle/wrapper-validation-action@v3 | |
- name: kvm support | |
run: | | |
egrep -c '(vmx|svm)' /proc/cpuinfo | |
id | |
sudo adduser $USER kvm | |
sudo chown -R $USER /dev/kvm | |
id | |
- name: prepare | |
run: | | |
sudo apt-get update && sudo apt-get install -y exiftool imagemagick xdg-utils libimage-exiftool-perl zsh jq xorg | |
# brew install exiftool imagemagick | |
- name: set up JDK ${{ matrix.java_version }} | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'adopt' | |
java-version: ${{ matrix.java_version }} | |
- name: Install Android SDK | |
uses: hannesa2/action-android/[email protected] | |
- name: Build with Gradle | |
run: ./gradlew assembleDebug | |
- name: Run tests | |
run: ./gradlew test | |
- name: Run instrumentation tests | |
uses: hannesa2/action-android/[email protected] | |
with: | |
cmd: ./gradlew cAT --continue | |
api: ${{ matrix.api }} | |
tag: ${{ matrix.tag }} | |
abi: ${{ matrix.abi }} | |
cmdOptions: -noaudio -no-boot-anim -no-window -metrics-collection | |
- name: Archive Espresso results | |
uses: actions/upload-artifact@v4 | |
if: ${{ always() }} | |
with: | |
name: SlidingUp-Espresso-report | |
path: app/build/reports/androidTests/connected | |
- name: Archive screenshots | |
if: ${{ always() }} | |
uses: actions/upload-artifact@v4 | |
with: | |
name: SlidingUp-Screenshots-${{ needs.env-job.outputs.modified-branch-name }} | |
path: | | |
app/build/outputs/connected_android_test_additional_output/debugAndroidTest/connected | |
app/build/outputs/androidTest-results/connected | |
- name: Compare screenshots | |
if: ${{ always() }} | |
env: | |
CLASSIC_TOKEN: ${{ secrets.CLASSIC_TOKEN }} | |
emulatorApi: ${{ matrix.emulatorApi }} | |
run: | | |
ls -ls app/build/outputs/connected_android_test_additional_output/debugAndroidTest/connected | |
cp app/build/outputs/connected_android_test_additional_output/debugAndroidTest/connected/emulator-5554\ -\ ${{ matrix.emulatorApi }}/* screenshotsToCompare${{ matrix.emulatorApi }} | |
export DISPLAY=:99 | |
sudo Xvfb -ac :99 -screen 0 1280x1024x24 > /dev/null 2>&1 & | |
./screenShotScript/screenShotCompare.sh | |
- name: Archive screenshots diffs | |
if: ${{ always() }} | |
uses: actions/upload-artifact@v4 | |
with: | |
name: SlidingUp-diffs-${{ needs.env-job.outputs.modified-branch-name }} | |
path: | | |
screenshotDiffs | |
- name: Show git status | |
if: ${{ always() }} | |
run: | | |
ls -la artifacts | |
git add screenshotsToCompare${{ matrix.emulatorApi }} | |
git status | |
[ "$(git status -s -uno)" ] && exit 1 || exit 0 |