Skip to content

Fix Project extension APIs #220

Fix Project extension APIs

Fix Project extension APIs #220

Workflow file for this run

name: Run tests
on:
push:
branches: [ '*' ]
pull_request:
branches: [ '*' ]
repository_dispatch:
types: [test]
env:
GPG_KEY_ARMOR: ${{ secrets.GPG_KEY_ARMOR }}
GPG_KEY_ID: ${{ secrets.GPG_KEY_ID }}
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }}
OSSRH_STAGING_PROFILE_ID: ${{ secrets.OSSRH_STAGING_PROFILE_ID }}
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
distribution: 'adopt'
java-version: '17'
cache: 'gradle'
- uses: actions/cache@v3
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ github.run_number }}
- uses: actions/cache@v3
with:
path: '**/build'
key: ${{ runner.os }}-build-${{ github.run_number }}
- shell: bash
run: |
echo "Create GPG private key"
echo ${GPG_KEY_ARMOR} | base64 --decode > ${GITHUB_WORKSPACE}/secring.gpg
rm -rvf ~/.m2
./gradlew clean publishToMavenLocal -S --no-daemon -Pversion=${{ github.run_number }} -Psigning.keyId=${GPG_KEY_ID} -Psigning.password=${GPG_PASSPHRASE} -Psigning.secretKeyRingFile=${GITHUB_WORKSPACE}/secring.gpg
test:
name: Unit Test
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
distribution: 'adopt'
java-version: '17'
cache: 'gradle'
- uses: actions/cache@v3
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ github.run_number }}
- uses: actions/cache@v3
with:
path: '**/build'
key: ${{ runner.os }}-build-${{ github.run_number }}
- shell: bash
run: ./gradlew test -S --no-daemon -Pversion=${{ github.run_number }}
- uses: actions/upload-artifact@v3
if: failure()
with:
name: unit-test-report
path: '**/build/reports/tests/test'
integration-test-agp-v8_0:
name: AGP 8.0 Integration Test
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
distribution: 'adopt'
java-version: '17'
cache: 'gradle'
- uses: actions/cache@v3
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ github.run_number }}
- shell: bash
run: ./gradlew booster-android-gradle-v8_0:integrationTest -S --no-daemon -Pversion=${{ github.run_number }}
- uses: actions/upload-artifact@v3
if: failure()
with:
name: booster-android-gradle-v8_0
path: booster-android-gradle-v8_0/build/reports/tests/integrationTest
integration-test-agp-v8_1:
name: AGP 8.1 Integration Test
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
distribution: 'adopt'
java-version: '17'
cache: 'gradle'
- uses: actions/cache@v3
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ github.run_number }}
- shell: bash
run: ./gradlew booster-android-gradle-v8_1:integrationTest -S --no-daemon -Pversion=${{ github.run_number }}
- uses: actions/upload-artifact@v3
if: failure()
with:
name: booster-android-gradle-v8_1
path: booster-android-gradle-v8_1/build/reports/tests/integrationTest
integration-test-agp-v8_2:
name: AGP 8.2 Integration Test
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
distribution: 'adopt'
java-version: '17'
cache: 'gradle'
- uses: actions/cache@v3
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ github.run_number }}
- shell: bash
run: ./gradlew booster-android-gradle-v8_2:integrationTest -S --no-daemon -Pversion=${{ github.run_number }}
- uses: actions/upload-artifact@v3
if: failure()
with:
name: booster-android-gradle-v8_2
path: booster-android-gradle-v8_2/build/reports/tests/integrationTest