Merging main into 1.x branch #389
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: CI | |
on: [push, pull_request] | |
jobs: | |
check: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Gradle Wrapper Validation | |
uses: gradle/wrapper-validation-action@v1 | |
- name: Install JDK | |
uses: actions/setup-java@v2 | |
with: | |
distribution: 'adopt' | |
java-version: '17' | |
- name: Lint and Unit tests | |
run: ./gradlew check --stacktrace | |
- name: Upload lint and test reports | |
if: always() | |
uses: actions/upload-artifact@v4 | |
with: | |
name: execution-reports | |
path: | | |
./core-android/build/reports | |
./rides-android/build/reports | |
test: | |
runs-on: macOS-latest # enables hardware acceleration in the virtual machine, required for emulator testing | |
strategy: | |
matrix: | |
api-level: [ 26, 30, 33 ] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Gradle Wrapper Validation | |
uses: gradle/wrapper-validation-action@v1 | |
- name: Install JDK | |
uses: actions/setup-java@v2 | |
with: | |
distribution: 'adopt' | |
java-version: '17' | |
upload-snapshots: | |
runs-on: ubuntu-latest | |
if: github.ref == 'refs/heads/main' && github.event_name != 'pull_request' | |
needs: | |
- check | |
- test | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Gradle Wrapper Validation | |
uses: gradle/wrapper-validation-action@v1 | |
- name: Install JDK | |
uses: actions/setup-java@v2 | |
with: | |
distribution: 'adopt' | |
java-version: '17' | |
- name: Upload snapshots | |
run: ./gradlew publish --stacktrace | |
env: | |
ORG_GRADLE_PROJECT_SONATYPE_NEXUS_USERNAME: ${{ secrets.SonatypeUsername }} | |
ORG_GRADLE_PROJECT_SONATYPE_NEXUS_PASSWORD: ${{ secrets.SonatypePassword }} |