diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 3c73345dc854..5e01f3979262 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -1,35 +1,31 @@ -name: Docs +name: Run Release Tests in Maestro on: - push: - branches: ["develop"] - workflow_dispatch: + inputs: + app-version: + description: 'App Version for Release' + required: true + default: 'PLACEHOLDER' -# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages -permissions: - contents: read - pages: write - id-token: write +env: + ASANA_PAT: ${{ secrets.GH_ASANA_SECRET }} -# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. -# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. concurrency: - group: "pages" - cancel-in-progress: false + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true jobs: - # Single deploy job since we're just deploying - deploy: - environment: - name: github-pages - url: ${{ steps.deployment.outputs.page_url }} - runs-on: ubuntu-latest + run-release-tests: + name: Run Release tests of tag version in Maestro + runs-on: ubuntu-20.04 + steps: - - name: Checkout + - name: Checkout repository uses: actions/checkout@v4 with: submodules: recursive + ref: ${{ github.event.inputs.app-version }} - name: Set up JDK 17 uses: actions/setup-java@v4 @@ -37,24 +33,52 @@ jobs: java-version: '17' distribution: 'adopt' + - name: Create folder + if: always() + run: mkdir apk + + - name: Decode keys + uses: davidSchuppa/base64Secret-toFile-action@v2 + with: + secret: ${{ secrets.FAKE_RELEASE_PROPERTIES }} + fileName: ddg_android_build.properties + destination-path: $HOME/jenkins_static/com.duckduckgo.mobile.android/ + + - name: Decode key file + uses: davidSchuppa/base64Secret-toFile-action@v2 + with: + secret: ${{ secrets.FAKE_RELEASE_KEY }} + fileName: android + destination-path: $HOME/jenkins_static/com.duckduckgo.mobile.android/ + - name: Setup Gradle uses: gradle/actions/setup-gradle@v3 - - name: Execute Gradle build - run: ./gradlew dokkaHtmlMultiModule + - name: Assemble release APK + run: ./gradlew assemblePlayRelease -Pforce-default-variant - - name: Copy files - run: | - mkdir -p docs - mv build/dokka/htmlMultiModule/* docs + - name: Move APK to new folder + if: always() + run: find . -name "*.apk" -exec mv '{}' apk/release.apk \; - - name: Setup Pages - uses: actions/configure-pages@v3 + - name: Release tests flows + uses: mobile-dev-inc/action-maestro-cloud@v1.8.1 + with: + api-key: ${{ secrets.MOBILE_DEV_API_KEY }} + name: ${{ github.sha }} + app-file: apk/release.apk + android-api-level: 30 + workspace: .maestro + include-tags: releaseTest - - name: Upload artifact - uses: actions/upload-pages-artifact@v2 + - name: Create Asana task when workflow failed + if: ${{ failure() }} + id: create-failure-task + uses: duckduckgo/native-github-asana-sync@v1.1 with: - path: 'docs' - - name: Deploy to GitHub Pages - id: deployment - uses: actions/deploy-pages@v2 \ No newline at end of file + asana-pat: ${{ secrets.GH_ASANA_SECRET }} + asana-project: ${{ vars.GH_ANDROID_APP_PROJECT_ID }} + asana-section: ${{ vars.GH_ANDROID_APP_INCOMING_SECTION_ID }} + asana-task-name: GH Workflow Failure - Tag Android Release + asana-task-description: Tag Android Release has failed. See https://github.com/duckduckgo/Android/actions/runs/${{ github.run_id }} + action: 'create-asana-task' \ No newline at end of file diff --git a/.github/workflows/docs_copy.yml b/.github/workflows/docs_copy.yml new file mode 100644 index 000000000000..3c73345dc854 --- /dev/null +++ b/.github/workflows/docs_copy.yml @@ -0,0 +1,60 @@ +name: Docs + +on: + push: + branches: ["develop"] + + workflow_dispatch: + +# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages +permissions: + contents: read + pages: write + id-token: write + +# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. +# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. +concurrency: + group: "pages" + cancel-in-progress: false + +jobs: + # Single deploy job since we're just deploying + deploy: + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + submodules: recursive + + - name: Set up JDK 17 + uses: actions/setup-java@v4 + with: + java-version: '17' + distribution: 'adopt' + + - name: Setup Gradle + uses: gradle/actions/setup-gradle@v3 + + - name: Execute Gradle build + run: ./gradlew dokkaHtmlMultiModule + + - name: Copy files + run: | + mkdir -p docs + mv build/dokka/htmlMultiModule/* docs + + - name: Setup Pages + uses: actions/configure-pages@v3 + + - name: Upload artifact + uses: actions/upload-pages-artifact@v2 + with: + path: 'docs' + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v2 \ No newline at end of file diff --git a/.github/workflows/release_production.yml b/.github/workflows/release_production.yml index d58c40eee55f..20c9c5c87009 100644 --- a/.github/workflows/release_production.yml +++ b/.github/workflows/release_production.yml @@ -28,7 +28,7 @@ jobs: app-version: ${{ github.event.inputs.app-version }} report_error: - - name: Create Asana task when workflow failed + name: Create Asana task when workflow failed if: ${{ failure() }} id: create-failure-task uses: duckduckgo/native-github-asana-sync@v1.1