Skip to content

Merge pull request #177 from usefulness/renovate/kotlin-monorepo #331

Merge pull request #177 from usefulness/renovate/kotlin-monorepo

Merge pull request #177 from usefulness/renovate/kotlin-monorepo #331

Workflow file for this run

name: Build project
on:
pull_request:
push:
branches:
- master
- main
- trunk
- develop
- maine
- mane
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: 20
- uses: gradle/wrapper-validation-action@v1
- uses: gradle/gradle-build-action@v2
- run: ./gradlew currentVersion
- run: ./gradlew projectCodestyle
- run: ./gradlew check --scan
- run: ./gradlew projectCoverage
- uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
- run: ./gradlew publishToMavenLocal
- run: ./gradlew publishPlugins -m
- run: git diff --exit-code
- name: Upload test results
if: ${{ always() }}
uses: actions/upload-artifact@v3
with:
name: test-results
path: "${{ github.workspace }}/**/build/reports/tests"
- name: Upload jacoco report
uses: actions/upload-artifact@v3
with:
name: jacoco-report
path: "${{ github.workspace }}/**/build/reports/jacoco"
- uses: actions/upload-artifact@v3
if: ${{ always() }}
with:
name: lint-results
path: '${{ github.workspace }}/**/build/**/reports/lint-results-*.html'
connected-test:
runs-on: macos-latest
strategy:
matrix:
apiVersion: [ 28 ]
steps:
- name: checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: 20
- uses: gradle/gradle-build-action@v2
- name: Set up Python
uses: actions/setup-python@v4
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
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 pytests connectedCheck
- name: Upload screenshot tests result
uses: actions/upload-artifact@v3
with:
name: screenshots
path: "${{ github.workspace }}/**/build/*AndroidTest/"
sample-smoke-test:
runs-on: macos-latest
strategy:
matrix:
apiVersion: [ 28 ]
steps:
- name: checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: 20
- uses: gradle/gradle-build-action@v2
with:
build-root-directory: sample
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version-file: '.python-version'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install 'Pillow==9.1.1'
- run: cd sample && ./gradlew check
- name: run screenshot 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
./gradlew verifyDebugAndroidTestScreenshotTest
- name: Upload screenshot tests result
uses: actions/upload-artifact@v3
with:
name: screenshots
path: "${{ github.workspace }}/**/build/*AndroidTest/"
- name: Upload failed screenshots
if: ${{ failure() }}
uses: actions/upload-artifact@v3
with:
name: failedScreenshots
path: "${{ github.workspace }}/**/build/failedScreenshots"