use package.json version in app.config and bump package.json version … #39
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 | |
| on: | |
| push: | |
| branches: [main] | |
| env: | |
| APP_VARIANT: internal | |
| CI: true | |
| jobs: | |
| e2e-test: | |
| name: Run ${{ matrix.test }} on ${{ matrix.platform }} | |
| strategy: | |
| matrix: | |
| include: | |
| # - platform: android | |
| # os: macos-latest | |
| # test: smoke | |
| # - platform: android | |
| # os: macos-latest | |
| # test: verification | |
| - platform: ios | |
| os: macos-latest | |
| test: smoke | |
| # - platform: ios | |
| # os: macos-latest | |
| # test: verification | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Install pnpm | |
| uses: pnpm/action-setup@v2 | |
| with: | |
| version: 9 | |
| - name: Set up Node.js with pnpm | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: "22" | |
| cache: "pnpm" | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Install Maestro | |
| run: | | |
| curl -Ls "https://get.maestro.mobile.dev" | bash | |
| export PATH="$PATH":"$HOME/.maestro/bin" | |
| - name: Decrypt GPG secure files | |
| run: | | |
| brew install [email protected] | |
| echo ${{ secrets.SUPER_SECRET_PASSWORD }} | gpg1 --no-tty --passphrase-fd 0 google-services.json.gpg | |
| - name: Build Expo app prebuild | |
| run: pnpm expo prebuild --platform ${{ matrix.platform }} | |
| - name: Cache iOS build | |
| uses: actions/cache@v4 | |
| if: matrix.platform == 'ios' | |
| with: | |
| path: | | |
| ios/build | |
| ~/Library/Developer/Xcode/DerivedData | |
| key: ${{ runner.os }}-ios-build-${{ hashFiles('ios/**/*.pbxproj', 'ios/Podfile.lock', 'src/**/*.tsx', 'src/**/*.ts') }} | |
| restore-keys: | | |
| ${{ runner.os }}-ios-build- | |
| - name: Setup iOS Simulator | |
| if: matrix.platform == 'ios' | |
| run: | | |
| DEVICE_ID=$(xcrun xctrace list devices | grep -m 1 "iPhone" | awk '{print $NF}' | tr -d '()') | |
| xcrun simctl boot $DEVICE_ID || true | |
| # - name: Setup Android Emulator | |
| # if: matrix.platform == 'android' | |
| # uses: reactivecircus/android-emulator-runner@v2 | |
| # with: | |
| # api-level: 31 | |
| # script: echo "Emulator started" | |
| - name: Build iOS App | |
| if: matrix.platform == 'ios' | |
| run: | | |
| xcodebuild -workspace DEMOCRACYInternal.xcworkspace -scheme DEMOCRACYInternal -configuration Release -sdk iphonesimulator -derivedDataPath build | xcbeautify | |
| working-directory: ${{ github.workspace }}/ios | |
| # - name: Install iOS App | |
| # if: matrix.platform == 'ios' | |
| # run: | | |
| # DEVICE_ID=$(xcrun xctrace list devices | grep -m 1 "iPhone" | awk '{print $NF}' | tr -d '()') | |
| # xcrun simctl install $DEVICE_ID ios/build/Build/Products/Release-iphonesimulator/DEMOCRACYInternal.app | |
| # - name: Launch iOS App | |
| # if: matrix.platform == 'ios' | |
| # run: | | |
| # DEVICE_ID=$(xcrun xctrace list devices | grep -m 1 "iPhone" | awk '{print $NF}' | tr -d '()') | |
| # xcrun simctl launch $DEVICE_ID de.democracy-deutschland.clientapp.internal | |
| # - name: Build and Run Android App | |
| # if: matrix.platform == 'android' | |
| # run: pnpm android | |
| # - name: Wait for App to be ready | |
| # run: sleep 30 | |
| # - name: Run Maestro Tests | |
| # run: | | |
| # export PATH="$PATH":"$HOME/.maestro/bin" | |
| # pnpm test:e2e:${{ matrix.test }} | |
| # - name: Upload Test Results | |
| # if: always() | |
| # uses: actions/upload-artifact@v4 | |
| # with: | |
| # name: maestro-${{ matrix.test }}-${{ matrix.platform }} | |
| # path: | | |
| # .maestro/test-results | |
| # .maestro/logs |