Update actions/upload-artifact action to v4 #176
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: Build project | |
on: | |
pull_request: | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: ${{ github.ref != 'refs/heads/master' }} | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- uses: actions/setup-java@v4 | |
with: | |
distribution: 'temurin' | |
java-version: 21 | |
- uses: gradle/wrapper-validation-action@v1 | |
- uses: gradle/gradle-build-action@v2 | |
- run: ./gradlew projectCodestyle | |
- run: ./gradlew assemble check --scan | |
- run: ./gradlew projectCoverage | |
- run: ./gradlew publishToMavenLocal | |
- run: git diff --exit-code | |
- name: Upload test results | |
if: ${{ always() }} | |
uses: actions/upload-artifact@v4 | |
with: | |
name: test-results | |
path: "${{ github.workspace }}/**/build/reports/tests" | |
- name: Upload jacoco report | |
uses: actions/upload-artifact@v4 | |
with: | |
name: jacoco-report | |
path: "${{ github.workspace }}/**/build/reports/jacoco" | |
- uses: actions/upload-artifact@v4 | |
if: ${{ always() }} | |
with: | |
name: lint-results | |
path: '${{ github.workspace }}/**/build/**/reports/lint-results-*.html' | |
screenshot-test: | |
runs-on: macos-latest | |
strategy: | |
matrix: | |
apiVersion: [ 28 ] | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- uses: actions/setup-java@v4 | |
with: | |
distribution: 'temurin' | |
java-version: 21 | |
- uses: gradle/gradle-build-action@v2 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version-file: '.python-version' | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install 'Pillow==9.1.1' | |
- name: run tests | |
uses: reactivecircus/android-emulator-runner@v2 | |
with: | |
api-level: ${{ matrix.apiVersion }} | |
profile: pixel_xl | |
target: google_apis | |
arch: x86 | |
disable-spellchecker: true | |
working-directory: sample | |
script: | | |
adb shell settings put global hidden_api_policy_p_apps 1 | |
adb shell settings put global hidden_api_policy_pre_p_apps 1 | |
adb shell settings put global hidden_api_policy 1 | |
python --version | |
pip show Pillow | |
./gradlew verify | |
- name: Upload tests result | |
uses: actions/upload-artifact@v4 | |
with: | |
name: android-tests | |
path: "${{ github.workspace }}/**/build/*AndroidTest/" | |
- name: Upload screeenshots | |
uses: actions/upload-artifact@v4 | |
if: ${{ always() }} | |
with: | |
name: screenshots-report | |
path: "${{ github.workspace }}/**/build/**/failedScreenshots/" | |
build-sample-app: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- uses: actions/setup-java@v4 | |
with: | |
distribution: 'temurin' | |
java-version: 21 | |
- name: Assemble sample app | |
uses: gradle/gradle-build-action@v2 | |
with: | |
build-root-directory: sample | |
arguments: assemble check | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: apk | |
path: sample/app/build/outputs/apk/release/*.apk |