|
| 1 | +name: E2E Tests Nightly |
| 2 | + |
| 3 | +on: |
| 4 | + schedule: |
| 5 | + # Runs "At 02:00 every night except weekends" |
| 6 | + - cron: '0 2 * * 1-5' |
| 7 | + |
| 8 | + workflow_dispatch: |
| 9 | + |
| 10 | +concurrency: |
| 11 | + group: ${{ github.ref }} |
| 12 | + cancel-in-progress: true |
| 13 | + |
| 14 | +env: |
| 15 | + BUILD_CACHE_AWS_REGION: ${{ secrets.BUILD_CACHE_AWS_REGION }} |
| 16 | + BUILD_CACHE_AWS_BUCKET: ${{ secrets.BUILD_CACHE_AWS_BUCKET }} |
| 17 | + BUILD_CACHE_AWS_ACCESS_KEY_ID: ${{ secrets.BUILD_CACHE_AWS_ACCESS_KEY_ID }} |
| 18 | + BUILD_CACHE_AWS_SECRET_KEY: ${{ secrets.BUILD_CACHE_AWS_SECRET_KEY }} |
| 19 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 20 | + |
| 21 | +jobs: |
| 22 | + build-compose-apks: |
| 23 | + name: Build |
| 24 | + uses: ./.github/workflows/e2e-build.yml |
| 25 | + |
| 26 | + run-compose-tests-nightly: |
| 27 | + name: Test compose |
| 28 | + runs-on: ubuntu-24.04 |
| 29 | + needs: build-compose-apks |
| 30 | + strategy: |
| 31 | + matrix: |
| 32 | + include: |
| 33 | + - android_api_level: 35 |
| 34 | + - android_api_level: 34 |
| 35 | + - android_api_level: 33 |
| 36 | + - android_api_level: 32 |
| 37 | + - android_api_level: 31 |
| 38 | + - android_api_level: 28 |
| 39 | + fail-fast: false |
| 40 | + env: |
| 41 | + ANDROID_API_LEVEL: ${{ matrix.android_api_level }} |
| 42 | + steps: |
| 43 | + |
| 44 | + |
| 45 | + continue-on-error: true |
| 46 | + with: |
| 47 | + name: apks |
| 48 | + - uses: ./.github/actions/setup-java |
| 49 | + - uses: ./.github/actions/enable-kvm |
| 50 | + - uses: ./.github/actions/setup-ruby |
| 51 | + - uses: ./.github/actions/allure-launch |
| 52 | + with: |
| 53 | + allure-token: ${{ secrets.ALLURE_TOKEN }} |
| 54 | + cron: true |
| 55 | + - name: Run tests |
| 56 | + uses: reactivecircus/android-emulator-runner@v2 |
| 57 | + timeout-minutes: 120 |
| 58 | + with: |
| 59 | + api-level: ${{ env.ANDROID_API_LEVEL }} |
| 60 | + disable-animations: true |
| 61 | + profile: pixel |
| 62 | + arch : x86_64 |
| 63 | + emulator-options: ${{ vars.EMULATOR_OPTIONS }} |
| 64 | + script: bundle exec fastlane run_e2e_test |
| 65 | + - name: Allure TestOps Upload |
| 66 | + run: bundle exec fastlane allure_upload |
| 67 | + if: success() || failure() |
| 68 | + timeout-minutes: 10 |
| 69 | + env: |
| 70 | + ALLURE_TOKEN: ${{ secrets.ALLURE_TOKEN }} |
| 71 | + LAUNCH_ID: ${{ env.LAUNCH_ID }} |
| 72 | + - name: Allure TestOps Launch Removal |
| 73 | + run: bundle exec fastlane allure_launch_removal |
| 74 | + if: cancelled() |
| 75 | + env: |
| 76 | + ALLURE_TOKEN: ${{ secrets.ALLURE_TOKEN }} |
| 77 | + LAUNCH_ID: ${{ env.LAUNCH_ID }} |
| 78 | + - name: Upload test results |
| 79 | + |
| 80 | + if: failure() |
| 81 | + with: |
| 82 | + name: logs_${{ env.ANDROID_API_LEVEL }} |
| 83 | + path: | |
| 84 | + fastlane/recordings/* |
| 85 | + fastlane/video-buddy-server.log |
| 86 | + fastlane/video-buddy-console.log |
| 87 | +
|
| 88 | + slack: |
| 89 | + name: Slack Report |
| 90 | + runs-on: ubuntu-latest |
| 91 | + needs: [build-compose-apks, run-compose-tests-nightly] |
| 92 | + if: failure() && github.event_name == 'schedule' |
| 93 | + steps: |
| 94 | + - uses: 8398a7/action-slack@v3 |
| 95 | + with: |
| 96 | + status: cancelled |
| 97 | + text: "You shall not pass!" |
| 98 | + job_name: "${{ github.workflow }}: ${{ github.job }}" |
| 99 | + fields: repo,commit,author,workflow |
| 100 | + env: |
| 101 | + SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_NIGHTLY_CHECKS }} |
0 commit comments