[UPD] TESTS - github action - Try to reduce metamemary by limiting th⦠#4
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: π E2E Tests | |
| env: | |
| EXPO_PUBLIC_API_URL: ${{ vars.API_URL }} | |
| EXPO_PUBLIC_AUTH_URL: ${{ vars.AUTH_URL }} | |
| EXPO_PUBLIC_OPENAPI_URL: ${{ vars.OPENAPI_URL }} | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: [test/e2e, test/e2e/**] | |
| pull_request: | |
| types: [closed] | |
| branches: [main] | |
| jobs: | |
| e2e-smoke: | |
| name: π¨ Smoke Tests | |
| if: github.event_name == 'push' || github.event_name == 'workflow_dispatch' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: π Setup repo | |
| uses: actions/checkout@v4 | |
| - name: π Setup pnpm | |
| uses: pnpm/action-setup@v4 | |
| with: | |
| version: 10 | |
| - name: π Setup Node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 'lts/*' | |
| cache: 'pnpm' | |
| - name: π Setup Java | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: temurin | |
| java-version: '17' | |
| - name: π Setup EAS | |
| uses: expo/expo-github-action@v8 | |
| with: | |
| eas-version: latest | |
| token: ${{ secrets.EXPO_TOKEN }} | |
| - name: π¦ Install dependencies | |
| run: pnpm install | |
| - name: π¨ Build APK (local) | |
| run: eas build --profile e2e --platform android --non-interactive --local --output build.apk | |
| env: | |
| APP_ENV: development | |
| ORG_GRADLE_PROJECT_reactNativeArchitectures: x86_64 | |
| - name: π Install Maestro | |
| run: curl -Ls "https://get.maestro.mobile.dev" | bash && echo "$HOME/.maestro/bin" >> $GITHUB_PATH | |
| - name: π€ Run smoke tests on emulator | |
| uses: reactivecircus/android-emulator-runner@v2 | |
| with: | |
| api-level: 34 | |
| arch: x86_64 | |
| script: | | |
| adb install build.apk | |
| pnpm test:e2e:smoke | |
| e2e-full: | |
| name: π Full E2E Tests | |
| if: (github.event_name == 'pull_request' && github.event.pull_request.merged == true) || github.event_name == 'workflow_dispatch' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: π Setup repo | |
| uses: actions/checkout@v4 | |
| - name: π Setup pnpm | |
| uses: pnpm/action-setup@v4 | |
| with: | |
| version: 10 | |
| - name: π Setup Node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 'lts/*' | |
| cache: 'pnpm' | |
| - name: π Setup Java | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: temurin | |
| java-version: '17' | |
| - name: π Setup EAS | |
| uses: expo/expo-github-action@v8 | |
| with: | |
| eas-version: latest | |
| token: ${{ secrets.EXPO_TOKEN }} | |
| - name: π¦ Install dependencies | |
| run: pnpm install | |
| - name: π¨ Build APK (local) | |
| run: eas build --profile e2e --platform android --non-interactive --local --output build.apk | |
| env: | |
| APP_ENV: development | |
| ORG_GRADLE_PROJECT_reactNativeArchitectures: x86_64 | |
| - name: π Install Maestro | |
| run: curl -Ls "https://get.maestro.mobile.dev" | bash && echo "$HOME/.maestro/bin" >> $GITHUB_PATH | |
| - name: π€ Run full E2E tests on emulator | |
| uses: reactivecircus/android-emulator-runner@v2 | |
| with: | |
| api-level: 34 | |
| arch: x86_64 | |
| script: | | |
| adb install build.apk | |
| pnpm test:e2e |