Upgraded to Material3 #113
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
# This workflow will build the project with Gradle, run integration tests, and release. | |
# Because secrets are not available on external forks, this job is expected to fail | |
# on external pull requests. | |
name: Build project & run tests | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
jobs: | |
publish: | |
runs-on: ubuntu-latest | |
if: github.repository == 'handstandsam/ShoppingApp' && github.ref == 'refs/heads/main' | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Set up our JDK environment | |
uses: actions/setup-java@v2 | |
with: | |
distribution: zulu | |
java-version: 17 | |
test: | |
runs-on: ubuntu-latest | |
timeout-minutes: 30 | |
strategy: | |
fail-fast: true | |
matrix: | |
api-level: | |
- 29 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Gradle Wrapper Validation | |
uses: gradle/wrapper-validation-action@v1 | |
- name: Set up our JDK environment | |
uses: actions/setup-java@v2 | |
with: | |
distribution: zulu | |
java-version: 17 | |
- name: Dependency Guard | |
run: ./gradlew dependencyGuard --scan --stacktrace | |
- name: Run All Checks - KMP4FREE Disabled | |
run: ./gradlew check -Pkmp4free=false -Pios=false -Pjs=false --scan --stacktrace | |
- name: Run All Checks with Multiplatform - KMP4FREE Enabled | |
run: ./gradlew check -Pkmp4free=true -Pios=true -Pjs=true --scan --stacktrace --rerun-tasks | |
- name: (Fail-only) Bundle test reports | |
if: failure() | |
run: find . -type d -name 'reports' | zip -@ -r build-reports.zip | |
- name: (Fail-only) Upload the build report | |
if: failure() | |
uses: actions/upload-artifact@v2 | |
with: | |
name: error-report | |
path: build-reports.zip | |
instrumentation-tests: | |
name: Instrumentation tests | |
runs-on: macos-latest | |
timeout-minutes: 20 | |
strategy: | |
# Allow tests to continue on other devices if they fail on one device. | |
fail-fast: false | |
matrix: | |
api-level: | |
- 29 | |
steps: | |
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4 | |
- uses: actions/setup-java@5896cecc08fd8a1fbdfaf517e29b571164b031f7 # v4 | |
with: | |
distribution: 'zulu' | |
java-version: '17' | |
check-latest: true | |
# - name: Instrumentation Tests | |
# uses: reactivecircus/android-emulator-runner@6b0df4b0efb23bb0ec63d881db79aefbc976e4b2 # v2 | |
# with: | |
# api-level: ${{ matrix.api-level }} | |
# target: default | |
# arch: x86_64 | |
# script: ./gradlew connectedCheck --no-build-cache --no-daemon --stacktrace | |
# | |
# - name: Upload results | |
# uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4 | |
# with: | |
# name: insrumentation-test-results | |
# path: ./**/build/reports/androidTests/connected/** |