Refine CLI and IPC API surfaces #33
Workflow file for this run
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: CLI Headless E2E | |
| on: | |
| push: | |
| paths: | |
| - 'src/**/*.cs' | |
| - 'src/**/*.csproj' | |
| - 'src/**/*.props' | |
| - 'src/**/*.targets' | |
| - 'src/**/*.sln' | |
| - 'src/**/*.slnx' | |
| - 'testing/automation/**' | |
| - '.github/workflows/cli-headless-e2e.yml' | |
| - 'global.json' | |
| pull_request: | |
| branches: [ "main" ] | |
| paths: | |
| - 'src/**/*.cs' | |
| - 'src/**/*.csproj' | |
| - 'src/**/*.props' | |
| - 'src/**/*.targets' | |
| - 'src/**/*.sln' | |
| - 'src/**/*.slnx' | |
| - 'testing/automation/**' | |
| - '.github/workflows/cli-headless-e2e.yml' | |
| - 'global.json' | |
| workflow_dispatch: | |
| jobs: | |
| cli-headless-e2e: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - os: windows-latest | |
| solution: UniGetUI.Windows.slnx | |
| daemon_project: UniGetUI/UniGetUI.csproj | |
| daemon_build_args: '-p:Platform=x64' | |
| manifest: testing/automation/cli-e2e.manifest.windows.json | |
| - os: ubuntu-latest | |
| solution: UniGetUI.Avalonia.slnx | |
| daemon_project: UniGetUI.Avalonia/UniGetUI.Avalonia.csproj | |
| daemon_build_args: '' | |
| manifest: testing/automation/cli-e2e.manifest.linux.json | |
| runs-on: ${{ matrix.os }} | |
| env: | |
| CONFIGURATION: Release | |
| NUGET_PACKAGES: ${{ github.workspace }}/.nuget/packages | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v6 | |
| - name: Setup .NET SDK | |
| uses: actions/setup-dotnet@v5 | |
| with: | |
| global-json-file: global.json | |
| - name: Setup Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: '3.12' | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| - name: Cache NuGet packages | |
| uses: actions/cache@v5 | |
| with: | |
| path: ${{ env.NUGET_PACKAGES }} | |
| key: ${{ runner.os }}-nuget-e2e-${{ hashFiles('global.json', 'src/**/*.csproj', 'src/**/*.props', 'src/**/*.targets', 'src/**/*.sln', 'src/**/*.slnx') }} | |
| restore-keys: | | |
| ${{ runner.os }}-nuget-e2e- | |
| - name: Restore solution | |
| working-directory: src | |
| shell: pwsh | |
| run: dotnet restore ${{ matrix.solution }} | |
| - name: Build headless daemon | |
| working-directory: src | |
| shell: pwsh | |
| run: | | |
| $args = @( | |
| 'build', | |
| '${{ matrix.daemon_project }}', | |
| '--no-restore', | |
| '--configuration', | |
| '${{ env.CONFIGURATION }}', | |
| '--verbosity', | |
| 'minimal' | |
| ) | |
| if ('${{ matrix.daemon_build_args }}') { | |
| $args += '${{ matrix.daemon_build_args }}' | |
| } | |
| dotnet @args | |
| - name: Build CLI | |
| working-directory: src | |
| shell: pwsh | |
| run: dotnet build UniGetUI.Cli/UniGetUI.Cli.csproj --no-restore --configuration ${{ env.CONFIGURATION }} --verbosity minimal | |
| - name: Upgrade pip tooling | |
| shell: pwsh | |
| run: python -m pip install --upgrade pip setuptools wheel | |
| - name: Show package-manager inventory | |
| shell: pwsh | |
| run: | | |
| dotnet --version | |
| python --version | |
| python -m pip --version | |
| npm --version | |
| - name: Run headless CLI E2E | |
| shell: pwsh | |
| env: | |
| UNIGETUI_CLI_E2E_MANIFEST: ${{ matrix.manifest }} | |
| UNIGETUI_CLI_E2E_ARTIFACTS: ${{ github.workspace }}/artifacts/cli-headless-e2e/${{ runner.os }} | |
| run: ./testing/automation/run-cli-e2e.ps1 | |
| - name: Upload CLI E2E artifacts | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: cli-headless-e2e-${{ runner.os }} | |
| path: artifacts/cli-headless-e2e/${{ runner.os }} | |
| if-no-files-found: warn |