diff --git a/.github/workflows/android-publish-artifact.yml b/.github/workflows/android-publish-artifact.yml new file mode 100644 index 0000000..527492d --- /dev/null +++ b/.github/workflows/android-publish-artifact.yml @@ -0,0 +1,44 @@ +name: android-publish-artifact + +on: + push: + branches: [ develop ] + pull_request: + branches: + - develop + paths-ignore: + - "app/src/main/**" + +permissions: + checks: write + +jobs: + publish: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: gradle/wrapper-validation-action@v3 + - name: set up JDK 17 + uses: actions/setup-java@v4 + with: + java-version: '17' + distribution: 'adopt' + - name: Wait for tests to succeed + uses: lewagon/wait-on-check-action@v1.3.3 + with: + ref: ${{ github.ref }} + running-workflow-name: android-publish-artifact + check-name: android-unit-test + repo-token: ${{ secrets.GITHUB_TOKEN }} + wait-interval: 20 + - uses: gradle/actions/setup-gradle@v3 + - name: Grant execute permission for gradlew + run: chmod +x gradlew + - name: Publish to local maven + run: | + ./gradlew build publishMavenPublicationToMavenLocal + - name: Upload artifacts + uses: actions/upload-artifact@v3 + with: + name: publications + path: ~/.m2/repository/io/wax911/emoji/ diff --git a/.github/workflows/android-test.yml b/.github/workflows/android-unit-test.yml similarity index 50% rename from .github/workflows/android-test.yml rename to .github/workflows/android-unit-test.yml index 5043599..e4e41aa 100644 --- a/.github/workflows/android-test.yml +++ b/.github/workflows/android-unit-test.yml @@ -1,4 +1,4 @@ -name: android-test +name: android-unit-test on: push: @@ -17,6 +17,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 + - uses: gradle/actions/setup-gradle@v3 - uses: gradle/wrapper-validation-action@v3 - name: set up JDK 17 uses: actions/setup-java@v4 @@ -35,31 +36,3 @@ jobs: if: always() # always run even if the previous step fails with: report_paths: '**/build/test-results/**/TEST-*.xml' - - instrumented: - runs-on: macos-latest - strategy: - fail-fast: false - matrix: - api-level: - - 23 - steps: - - uses: actions/checkout@v4 - - uses: gradle/wrapper-validation-action@v3 - - uses: actions/setup-java@v4 - with: - java-version: '17' - distribution: 'adopt' - - uses: gradle/gradle-build-action@v3 - - name: Run Tests - uses: reactivecircus/android-emulator-runner@v2 - with: - api-level: ${{ matrix.api-level }} - script: ./gradlew connectedCheck - env: - API_LEVEL: ${{ matrix.api-level }} - - name: Publish Integrated Test Report - uses: mikepenz/action-junit-report@v4 - if: always() # always run even if the previous step fails - with: - report_paths: '**/build/androidTest-results/**/TEST-*.xml' diff --git a/.idea/gradle.xml b/.idea/gradle.xml index 4e086b5..e47aa85 100644 --- a/.idea/gradle.xml +++ b/.idea/gradle.xml @@ -24,7 +24,6 @@