Use root drive as installation target for Microsoft PowerPoint app (#8) #46
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: verify | |
| on: | |
| workflow_dispatch: | |
| push: | |
| pull_request: | |
| permissions: | |
| contents: read | |
| jobs: | |
| verify-macos: | |
| name: Verify on macOS runner | |
| runs-on: macos-latest | |
| steps: | |
| - name: checkout | |
| uses: actions/checkout@v6 | |
| - name: run setup-powerpoint | |
| id: setup | |
| uses: ./ | |
| - name: verify installation | |
| run: | | |
| expected_path="/Applications/Microsoft PowerPoint.app" | |
| expected_package="Microsoft_PowerPoint_16.103.25113013_Updater.pkg" | |
| expected_url="https://officecdn.microsoft.com/pr/C1297A47-86C4-4C1F-97FA-950631F94777/MacAutoupdate/${expected_package}" | |
| expected_version='16.103.3' | |
| expected_build='25113013' | |
| if [ "${{ steps.setup.outputs.path }}" != "$expected_path" ]; then | |
| echo "Action output 'path' was '${{ steps.setup.outputs.path }}' but expected '$expected_path'" | |
| exit 1 | |
| fi | |
| if [ "${{ steps.setup.outputs.version }}" != "$expected_version" ]; then | |
| echo "Action output 'version' was '${{ steps.setup.outputs.version }}' but expected '$expected_version'" | |
| exit 1 | |
| fi | |
| if [ "${{ steps.setup.outputs.build }}" != "$expected_build" ]; then | |
| echo "Action output 'build' was '${{ steps.setup.outputs.build }}' but expected '$expected_build'" | |
| exit 1 | |
| fi | |
| if [ "${{ steps.setup.outputs.package }}" != "$expected_package" ]; then | |
| echo "Action output 'package' was '${{ steps.setup.outputs.package }}' but expected '$expected_package'" | |
| exit 1 | |
| fi | |
| if [ "${{ steps.setup.outputs.installer-url }}" != "$expected_url" ]; then | |
| echo "Action output 'installer-url' was '${{ steps.setup.outputs.installer-url }}' but expected '$expected_url'" | |
| exit 1 | |
| fi | |
| echo "Action outputs match installed Microsoft PowerPoint metadata" | |
| - name: troubleshoot desktop | |
| run: | | |
| screencapture ./desktop.png | |
| - name: upload desktop screenshot | |
| uses: actions/upload-artifact@v5 | |
| with: | |
| name: desktop-screenshot | |
| path: desktop.png | |
| verify-macos-custom-package: | |
| name: Verify on macOS runner (custom installer package) | |
| runs-on: macos-latest | |
| steps: | |
| - name: checkout | |
| uses: actions/checkout@v6 | |
| - name: run setup-powerpoint | |
| uses: ./ | |
| with: | |
| package: Microsoft_PowerPoint_16.102.25101829_Updater.pkg | |
| - name: verify custom release | |
| run: | | |
| if [ ! -d "/Applications/Microsoft PowerPoint.app" ]; then | |
| echo "Microsoft PowerPoint is not installed" | |
| exit 1 | |
| fi | |
| version=$(defaults read "/Applications/Microsoft PowerPoint.app/Contents/Info.plist" CFBundleShortVersionString || true) | |
| if [ "$version" != "16.102.1" ]; then | |
| echo "Unexpected PowerPoint version: '$version' (expected 16.102.1)" | |
| exit 1 | |
| fi | |
| echo "Microsoft PowerPoint version is $version" | |
| verify-ubuntu: | |
| name: Verify on Ubuntu runner | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: run setup-powerpoint (expected failure) | |
| id: setup | |
| continue-on-error: true | |
| uses: ./ | |
| - name: assert action failed | |
| if: ${{ !cancelled() }} | |
| run: | | |
| if [ "${{ steps.setup.outcome }}" != "failure" ]; then | |
| echo "Action unexpectedly succeeded on a Ubuntu runner" | |
| exit 1 | |
| fi | |
| echo "Action correctly failed on Ubuntu runner" | |
| verify-windows: | |
| name: Verify on Windows runner | |
| runs-on: windows-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: run setup-powerpoint (expected failure) | |
| id: setup | |
| continue-on-error: true | |
| uses: ./ | |
| - name: assert action failed | |
| if: ${{ !cancelled() }} | |
| shell: pwsh | |
| run: | | |
| if ("${{ steps.setup.outcome }}" -ne "failure") { | |
| Write-Error "Action unexpectedly succeeded on a Windows runner" | |
| exit 1 | |
| } | |
| Write-Host "Action correctly failed on Windows runner" |