From 1fbd64213f622c0119db281053c9731bb7412f9e Mon Sep 17 00:00:00 2001 From: VaiTon Date: Tue, 29 Jun 2021 12:47:15 +0200 Subject: [PATCH] build: add dokka to android-integration.yml workflow --- .github/workflows/android-integration.yml | 45 +++++++++++++++++++++-- .github/workflows/android-release.yml | 27 ++++++++------ .github/workflows/deploy-java-docs.yml | 28 -------------- 3 files changed, 56 insertions(+), 44 deletions(-) delete mode 100644 .github/workflows/deploy-java-docs.yml diff --git a/.github/workflows/android-integration.yml b/.github/workflows/android-integration.yml index fdf68ac4ab8f..97d4a18c4436 100644 --- a/.github/workflows/android-integration.yml +++ b/.github/workflows/android-integration.yml @@ -2,11 +2,12 @@ name: Android Integration on: push: - branches: [develop] + branches: [ develop ] pull_request: - branches: [develop] + branches: [ develop ] jobs: + compile_screenshots: name: Compile Screenshot Tests runs-on: ubuntu-20.04 @@ -28,6 +29,7 @@ jobs: compileOffPlaystoreScreenshotsAndroidTestSources -PtestBuildType=screenshots + test: name: Unit Tests runs-on: ubuntu-20.04 @@ -51,6 +53,7 @@ jobs: testOpfPlaystoreDebugUnitTest testOpffPlaystoreDebugUnitTest + assemble_apk: name: Assemble APKs runs-on: ubuntu-20.04 @@ -107,8 +110,9 @@ jobs: - lint: - name: Lint + + lint_off: + name: Lint OFF runs-on: ubuntu-20.04 steps: @@ -136,3 +140,36 @@ jobs: uses: yutailang0119/action-android-lint@v1.1.0 with: xml_path: ./app/build/reports/lint-results-offPlaystoreDebug.xml + + build_deploy_pages: + name: Deploy dokka to GitHub Pages + runs-on: ubuntu-20.04 + + needs: + - assemble_apk + - test + + steps: + - name: Checkout sources + uses: actions/checkout@v2.3.4 + + - name: Set up JDK 11 + uses: actions/setup-java@v2 + with: + distribution: 'adopt' + java-version: '11' + + - name: Grant execute permission for gradlew + run: chmod +x gradlew + + - name: Generate documentation + uses: eskatos/gradle-command-action@v1.3.3 + with: + arguments: dokkaHtml + + - name: Deploy API documentation to Github Pages + uses: JamesIves/github-pages-deploy-action@4.1.4 + with: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + BRANCH: gh-pages + FOLDER: app/build/dokka/html/ diff --git a/.github/workflows/android-release.yml b/.github/workflows/android-release.yml index f81d60f1e9d5..28ee49b1219d 100644 --- a/.github/workflows/android-release.yml +++ b/.github/workflows/android-release.yml @@ -4,11 +4,12 @@ on: push: branches: - 'release/*' - #- 'fastlane-for-flavors' +# - 'fastlane-for-flavors' jobs: - testObf: - name: OBF testing + + testOff: + name: Test OFF runs-on: ubuntu-20.04 steps: - name: Checkout sources @@ -23,10 +24,10 @@ jobs: - name: Unit tests uses: eskatos/gradle-command-action@v1.3.3 with: - arguments: testObfPlaystoreDebugUnitTest --stacktrace + arguments: testOffPlaystoreDebugUnitTest --stacktrace - testOff: - name: OFF testing + testObf: + name: Test OBF runs-on: ubuntu-20.04 steps: - name: Checkout sources @@ -41,10 +42,10 @@ jobs: - name: Unit tests uses: eskatos/gradle-command-action@v1.3.3 with: - arguments: testOffPlaystoreDebugUnitTest --stacktrace + arguments: testObfPlaystoreDebugUnitTest --stacktrace testOpf: - name: OPF testing + name: Test OPF runs-on: ubuntu-20.04 steps: - name: Checkout sources @@ -62,7 +63,7 @@ jobs: arguments: testOpfPlaystoreDebugUnitTest --stacktrace testOpff: - name: OPFF testing + name: Test OPFF runs-on: ubuntu-20.04 steps: - name: Checkout sources @@ -80,13 +81,15 @@ jobs: arguments: testOpffPlaystoreDebugUnitTest --stacktrace google-play-internal: + name: Deploy OFF on Google Play + runs-on: ubuntu-20.04 + needs: - testObf - testOff - testOpf - testOpff - name: Generate and deploy Open Food Facts on Google Play - runs-on: ubuntu-20.04 + steps: - name: Checkout sources uses: actions/checkout@v2.3.4 @@ -127,7 +130,7 @@ jobs: SIGN_STORE_PASSWORD: ${{ secrets.SIGN_STORE_PASSWORD }} SIGN_KEY_ALIAS: ${{ secrets.SIGN_KEY_ALIAS }} SIGN_KEY_PASSWORD: ${{ secrets.SIGN_KEY_PASSWORD }} - + - name: Run Fastlane release lane for Open Products Facts run: bundle exec fastlane release_opf env: diff --git a/.github/workflows/deploy-java-docs.yml b/.github/workflows/deploy-java-docs.yml deleted file mode 100644 index a5037b32da7f..000000000000 --- a/.github/workflows/deploy-java-docs.yml +++ /dev/null @@ -1,28 +0,0 @@ - name: GitHub Pages Deploy Action - on: - push: - branches: - - "develop" - jobs: - deploy-pages: - name: Deploy to GitHub Pages - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - name: Set up JDK 12 - uses: actions/setup-java@v1 - with: - java-version: 12 - - name: Grant execute permission for gradlew - run: chmod +x gradlew - #- name: Build and run tests - # run: ./gradlew build - - name: Generate API documentation - run: ./gradlew dokkaHtml - - name: Deploy API documentation to Github Pages - uses: JamesIves/github-pages-deploy-action@4.1.4 - with: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - BRANCH: gh-pages - FOLDER: app/build/dokka/html/ -