|
| 1 | +name: 'Community Edition - Desktop-mac M1 prod release full test suite run on pull request' |
| 2 | +on: |
| 3 | + pull_request: |
| 4 | + branches: [ main ] |
| 5 | + |
| 6 | +concurrency: |
| 7 | + group: pr-desktop-mac-m1-prod-community-${{ github.event.pull_request.number }} |
| 8 | + cancel-in-progress: true |
| 9 | + |
| 10 | +jobs: |
| 11 | + test-desktop-mac-m1-prod: |
| 12 | + runs-on: macos-15 |
| 13 | + timeout-minutes: 90 |
| 14 | + steps: |
| 15 | + - uses: actions/checkout@v3 |
| 16 | + - name: setup node |
| 17 | + uses: actions/setup-node@v3 |
| 18 | + with: |
| 19 | + node-version: 20 |
| 20 | + - name: install Rust stable |
| 21 | + uses: dtolnay/rust-toolchain@stable |
| 22 | + with: |
| 23 | + toolchain: 1.85.1 |
| 24 | + |
| 25 | + - name: build phoenix dist-test |
| 26 | + run: | |
| 27 | + npm ci |
| 28 | + npm run build |
| 29 | + npm run release:prod |
| 30 | +
|
| 31 | + - name: Download phoenix desktop and build test runner |
| 32 | + env: |
| 33 | + GH_TOKEN: ${{ github.token }} |
| 34 | + run: | |
| 35 | + cd .. |
| 36 | + git clone https://github.com/phcode-dev/phoenix-desktop.git |
| 37 | + cd phoenix-desktop |
| 38 | + npm ci |
| 39 | + npm run releaseDistTestDebug |
| 40 | +
|
| 41 | + - name: Run tauri unit tests |
| 42 | + uses: nick-fields/retry@v2 |
| 43 | + id: macM1RunUnit |
| 44 | + continue-on-error: true |
| 45 | + with: |
| 46 | + timeout_minutes: 12 |
| 47 | + max_attempts: 3 |
| 48 | + command: ../phoenix-desktop/src-tauri/target/debug/phoenix-test --run-tests=unit -q |
| 49 | + |
| 50 | + - name: Run tauri integration tests |
| 51 | + uses: nick-fields/retry@v2 |
| 52 | + id: macM1RunIntegration |
| 53 | + continue-on-error: true |
| 54 | + with: |
| 55 | + timeout_minutes: 12 |
| 56 | + max_attempts: 3 |
| 57 | + command: ../phoenix-desktop/src-tauri/target/debug/phoenix-test --run-tests=integration -q |
| 58 | + |
| 59 | + - name: Run tauri mainview tests |
| 60 | + uses: nick-fields/retry@v2 |
| 61 | + id: macM1RunMainview |
| 62 | + continue-on-error: true |
| 63 | + with: |
| 64 | + timeout_minutes: 12 |
| 65 | + max_attempts: 3 |
| 66 | + command: ../phoenix-desktop/src-tauri/target/debug/phoenix-test --run-tests=mainview -q |
| 67 | + |
| 68 | + - name: Run tauri livepreview tests |
| 69 | + uses: nick-fields/retry@v2 |
| 70 | + id: macM1RunLivepreview |
| 71 | + continue-on-error: true |
| 72 | + with: |
| 73 | + timeout_minutes: 12 |
| 74 | + max_attempts: 3 |
| 75 | + command: ../phoenix-desktop/src-tauri/target/debug/phoenix-test --run-tests=livepreview -q |
| 76 | + |
| 77 | + - name: Run tauri LegacyInteg tests |
| 78 | + uses: nick-fields/retry@v2 |
| 79 | + id: macM1RunLegacyInteg |
| 80 | + continue-on-error: true |
| 81 | + with: |
| 82 | + timeout_minutes: 20 |
| 83 | + max_attempts: 3 |
| 84 | + command: ../phoenix-desktop/src-tauri/target/debug/phoenix-test --run-tests=LegacyInteg -q |
| 85 | + |
| 86 | + - name: Fail on test runs failed in Mac M1 (prod) |
| 87 | + if: steps.macM1RunUnit.outcome == 'failure' || steps.macM1RunIntegration.outcome == 'failure' || steps.macM1RunMainview.outcome == 'failure' || steps.macM1RunLivepreview.outcome == 'failure' || steps.macM1RunLegacyInteg.outcome == 'failure' |
| 88 | + run: | |
| 89 | + echo "Mac M1 (prod) tests failed, marking step as failed" |
| 90 | + echo "Failed tests:" |
| 91 | + if [ "${{ steps.macM1RunUnit.outcome }}" == "failure" ]; then |
| 92 | + echo "- Run tauri unit tests" |
| 93 | + fi |
| 94 | + if [ "${{ steps.macM1RunIntegration.outcome }}" == "failure" ]; then |
| 95 | + echo "- Run tauri integration tests" |
| 96 | + fi |
| 97 | + if [ "${{ steps.macM1RunMainview.outcome }}" == "failure" ]; then |
| 98 | + echo "- Run tauri mainview tests" |
| 99 | + fi |
| 100 | + if [ "${{ steps.macM1RunLivepreview.outcome }}" == "failure" ]; then |
| 101 | + echo "- Run tauri livepreview tests" |
| 102 | + fi |
| 103 | + if [ "${{ steps.macM1RunLegacyInteg.outcome }}" == "failure" ]; then |
| 104 | + echo "- Run tauri LegacyInteg tests" |
| 105 | + fi |
| 106 | + exit 1 |
0 commit comments