55 workflow_dispatch :
66 pull_request :
77
8+ permissions : {}
9+
810# Enrich gradle.properties for CI/CD
911env :
1012 GRADLE_OPTS : -Dorg.gradle.jvmargs=-Xmx8g -XX:MaxMetaspaceSize=512m -Dfile.encoding=UTF-8 -XX:+HeapDumpOnOutOfMemoryError -XX:+UseG1GC -Dkotlin.daemon.jvm.options=-Xmx4g
@@ -36,18 +38,19 @@ jobs:
3638 docker-images : true
3739 swap-storage : false
3840
39- - uses : actions/checkout@v6
41+ - uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
4042 with :
4143 # Ensure we are building the branch and not the branch after being merged on develop
4244 # https://github.com/actions/checkout/issues/881
4345 ref : ${{ github.ref }}
44- - uses : actions/setup-java@v5
46+ persist-credentials : false
47+ - uses : actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5.2.0
4548 name : Use JDK 21
4649 with :
4750 distribution : ' temurin' # See 'Supported distributions' for available options
4851 java-version : ' 21'
4952 - name : Configure gradle
50- uses : gradle/actions/setup-gradle@v5
53+ uses : gradle/actions/setup-gradle@0723195856401067f7a2779048b490ace7a47d7c # v5.0.2
5154 with :
5255 cache-read-only : ${{ github.ref != 'refs/heads/develop' }}
5356 - name : Assemble debug APK
5760 ELEMENT_ANDROID_MAPTILER_LIGHT_MAP_ID : ${{ secrets.MAPTILER_LIGHT_MAP_ID }}
5861 ELEMENT_ANDROID_MAPTILER_DARK_MAP_ID : ${{ secrets.MAPTILER_DARK_MAP_ID }}
5962 - name : Upload APK as artifact
60- uses : actions/upload-artifact@v7
63+ uses : actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
6164 with :
6265 name : elementx-apk-maestro
6366 path : |
@@ -75,14 +78,15 @@ jobs:
7578 concurrency :
7679 group : maestro-test
7780 steps :
78- - uses : actions/checkout@v6
81+ - uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
7982 if : (github.event_name == 'pull_request' && github.event.pull_request.fork == null) || github.event_name == 'workflow_dispatch'
8083 with :
8184 # Ensure we are building the branch and not the branch after being merged on develop
8285 # https://github.com/actions/checkout/issues/881
8386 ref : ${{ github.ref }}
87+ persist-credentials : false
8488 - name : Download APK artifact from previous job
85- uses : actions/download-artifact@v8
89+ uses : actions/download-artifact@70fc10c6e5e1ce46ad2ea6f2b72d43f7d47b13c3 # v8.0.0
8690 with :
8791 name : elementx-apk-maestro
8892 - name : Enable KVM group perms
9498 run : curl -fsSL "https://get.maestro.mobile.dev" | bash
9599 - name : Run Maestro tests in emulator
96100 id : maestro_test
97- uses : reactivecircus/android-emulator-runner@v2
101+ uses : reactivecircus/android-emulator-runner@b530d96654c385303d652368551fb075bc2f0b6b # v2.35.0
98102 continue-on-error : true
99103 env :
100104 MAESTRO_USERNAME : maestroelement
@@ -115,7 +119,7 @@ jobs:
115119 script : |
116120 .github/workflows/scripts/maestro/maestro-local-with-screen-recording.sh app-gplay-x86_64-debug.apk
117121 - name : Upload test results
118- uses : actions/upload-artifact@v7
122+ uses : actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
119123 with :
120124 name : test-results
121125 path : |
0 commit comments