Bump actions/upload-artifact from 6 to 7 #136
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: Android Tests | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| workflow_dispatch: | |
| inputs: | |
| branch: | |
| description: "Branch to test" | |
| required: false | |
| default: "main" | |
| type: string | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| env: | |
| GPR_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| GPR_USER: ${{ secrets.GITHUB_ACTOR }} | |
| defaults: | |
| run: | |
| working-directory: ./example | |
| jobs: | |
| android-tests: | |
| timeout-minutes: 45 | |
| name: Android Tests | |
| runs-on: warp-ubuntu-latest-x64-16x | |
| permissions: | |
| contents: read | |
| steps: | |
| - name: Checkout project sources | |
| uses: actions/checkout@v6 | |
| with: | |
| ref: ${{ inputs.branch || github.ref }} | |
| - name: Setup Java | |
| uses: actions/setup-java@v5 | |
| with: | |
| distribution: temurin | |
| java-version: 17 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version-file: ".nvmrc" | |
| cache: yarn | |
| - name: Install dependencies | |
| run: yarn install --frozen-lockfile | |
| - name: Install Maestro | |
| run: | | |
| curl -Ls "https://get.maestro.mobile.dev" | bash | |
| echo "$HOME/.maestro/bin" >> $GITHUB_PATH | |
| # https://github.com/ReactiveCircus/android-emulator-runner?tab=readme-ov-file#running-hardware-accelerated-emulators-on-linux-runners | |
| - name: Enable KVM group perms | |
| run: | | |
| echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules | |
| sudo udevadm control --reload-rules | |
| sudo udevadm trigger --name-match=kvm | |
| - name: Start XMTP backend services | |
| run: docker compose -p xmtp -f ../dev/local/docker-compose.yml up -d | |
| - name: Create native Android app and run E2E tests | |
| uses: reactivecircus/android-emulator-runner@v2 | |
| with: | |
| avd-name: "XMTP_Android_Test" | |
| working-directory: ./example | |
| api-level: 29 | |
| script: | | |
| yarn e2e:android:all | |
| - name: Upload E2E test artifacts | |
| if: failure() | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: e2e-test-results | |
| path: | | |
| example/e2e/.maestro/ | |
| compression-level: 6 | |
| if-no-files-found: warn | |
| include-hidden-files: true | |
| retention-days: 14 | |
| - name: Stop XMTP backend services | |
| if: always() | |
| run: docker compose -p xmtp -f ../dev/local/docker-compose.yml down |