Android-Password-Store/.github/workflows/pull_request.yml

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

106 lines
3.2 KiB
YAML
Raw Normal View History

on:
pull_request:
merge_group:
name: Check pull request
concurrency:
group: ${{ github.head_ref || github.ref_name }}
cancel-in-progress: true
env:
SENTRY_DSN: 'https://public_key@example.com/project_id'
jobs:
check-codestyle:
runs-on: ubuntu-latest
steps:
- name: Setup build environment
uses: android-password-store/android-password-store/.github/reusable-workflows/setup-gradle@develop
- name: Check codestyle
shell: bash
run: ./gradlew ktfmtCheck
- name: Upload Kotlin build report
if: "${{ always() }}"
uses: actions/upload-artifact@1746f4ab65b179e0ea60a494b83293b640dd5bba # v4.3.2
with:
name: Build report (check-codestyle)
path: build/reports/kotlin-build/
unit-tests:
runs-on: ubuntu-latest
steps:
- name: Setup build environment
uses: android-password-store/android-password-store/.github/reusable-workflows/setup-gradle@develop
- name: Run unit tests
shell: bash
run: ./gradlew test -PslimTests
- name: (Fail-only) Upload test report
if: "${{ failure() }}"
uses: actions/upload-artifact@1746f4ab65b179e0ea60a494b83293b640dd5bba # v4.3.2
with:
name: Test report (unit-tests)
path: app/build/reports
- name: Upload Kotlin build report
if: "${{ always() }}"
uses: actions/upload-artifact@1746f4ab65b179e0ea60a494b83293b640dd5bba # v4.3.2
with:
name: Build report (unit-tests)
path: build/reports/kotlin-build/
build-apks:
runs-on: ubuntu-latest
steps:
- name: Setup build environment
uses: android-password-store/android-password-store/.github/reusable-workflows/setup-gradle@develop
- name: Build debug APKs
shell: bash
run: ./gradlew assembleFreeDebug assembleNonFreeDebug assembleNonFreeRelease
- name: Upload Kotlin build report
if: "${{ always() }}"
uses: actions/upload-artifact@1746f4ab65b179e0ea60a494b83293b640dd5bba # v4.3.2
with:
name: Build report (build-apks)
path: build/reports/kotlin-build/
check-api:
runs-on: ubuntu-latest
steps:
- name: Setup build environment
uses: android-password-store/android-password-store/.github/reusable-workflows/setup-gradle@develop
- name: Check library API
shell: bash
run: ./gradlew metalavaCheckCompatibilityRelease
- name: Upload Kotlin build report
if: "${{ always() }}"
uses: actions/upload-artifact@1746f4ab65b179e0ea60a494b83293b640dd5bba # v4.3.2
with:
name: Build report (check-api)
path: build/reports/kotlin-build/
2022-07-17 08:37:50 +00:00
lint:
2022-07-17 08:37:50 +00:00
runs-on: ubuntu-latest
steps:
- name: Setup build environment
uses: android-password-store/android-password-store/.github/reusable-workflows/setup-gradle@develop
2022-07-17 08:37:50 +00:00
- name: Run Lint
shell: bash
run: ./gradlew lint
2022-07-17 08:37:50 +00:00
- name: Upload Kotlin build report
if: "${{ always() }}"
uses: actions/upload-artifact@1746f4ab65b179e0ea60a494b83293b640dd5bba # v4.3.2
2022-07-17 08:37:50 +00:00
with:
name: Build report (lint)
2022-07-17 08:37:50 +00:00
path: build/reports/kotlin-build/