api34 #370
Workflow file for this run
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: PullRequest | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
env: | |
BRANCH_NAME: ${{ github.head_ref || github.ref_name }} | |
jobs: | |
env-job: | |
runs-on: 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} | |
buildTest: | |
name: Build & Run Unit-Tests | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Set up JDK | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'adopt' | |
java-version: 17 | |
- uses: gradle/actions/wrapper-validation@v3 | |
- name: Build project | |
run: ./gradlew assembleDebug | |
- name: Run tests | |
run: ./gradlew test | |
- name: Jacoco | |
run: ./gradlew :tracker:jacocoTestReport --no-daemon | |
- name: Codecov | |
run: bash <(curl -s https://codecov.io/bash) | |
Check: | |
name: Check | |
runs-on: ubuntu-latest | |
needs: | |
- env-job | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Install JDK | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'adopt' | |
java-version: 17 | |
- name: Code checks | |
run: ./gradlew check | |
- name: Archive Lint report | |
uses: actions/upload-artifact@v4 | |
if: ${{ always() }} | |
with: | |
name: Matomo-Lint-${{ needs.env-job.outputs.modified-branch-name }} | |
path: tracker/build/reports/lint-results.html | |
EspressoTest: | |
runs-on: macOS-13 | |
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 }} | |
- name: prepare | |
run: brew install exiftool imagemagick | |
- name: set up JDK 17 | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'adopt' | |
java-version: 17 | |
- name: Install Android SDK | |
uses: hannesa2/action-android/install-sdk@0.1.16.7 | |
- name: Run instrumentation tests | |
uses: hannesa2/action-android/emulator-run-cmd@0.1.16.7 | |
with: | |
cmd: ./gradlew cAT --continue | |
api: 30 | |
tag: default | |
abi: x86_64 | |
cmdOptions: -noaudio -no-boot-anim -no-window | |
- name: Archive Espresso results | |
uses: actions/upload-artifact@v4 | |
if: ${{ always() }} | |
with: | |
name: matomo-Espresso-${{ needs.env-job.outputs.modified-branch-name }} | |
path: | | |
./**/build/reports/androidTests/connected | |
./**/build/outputs | |
!./**/build/outputs/apk |