Run Winget Install Tests #405
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
| # Description: This workflow runs tests for hustcer/deepseek-review. | |
| # REF: | |
| # - https://github.com/vyadh/nutest/blob/main/.github/workflows/tests.yaml | |
| # - https://github.com/fdncred/winget-pkgs/blob/master/doc/manifest/schema/1.10.0/installer.md | |
| # - https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/store-information-in-variables#default-environment-variables | |
| name: Run Winget Install Tests | |
| on: | |
| pull_request: | |
| paths-ignore: | |
| - '**.md' | |
| - 'docs/**' | |
| workflow_dispatch: | |
| push: | |
| branches: | |
| - main | |
| - develop | |
| - feature/msi-test | |
| paths-ignore: | |
| - '**.md' | |
| - 'docs/**' | |
| schedule: | |
| - cron: '0 2 * * *' # Run every morning at 2am UTC | |
| permissions: | |
| contents: read | |
| jobs: | |
| default-scope: | |
| name: Install with Default Scope | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [windows-latest, windows-2025] | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Upgrade Winget | |
| run: | | |
| winget --version | |
| # winget upgrade winget --accept-package-agreements --accept-source-agreements --disable-interactivity | |
| # winget --version | |
| # winget install Nushell.Nushell --disable-interactivity --accept-source-agreements | |
| - name: Setup Nu | |
| uses: hustcer/setup-nu@v3 | |
| with: | |
| version: 'nightly' | |
| - name: Install Komac Tool | |
| shell: cmd | |
| run: | | |
| winget install komac --accept-source-agreements --accept-package-agreements --disable-interactivity | |
| - name: Test Winget Install with Default Scope | |
| shell: nu {0} | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| nu tests/winget-install.nu | |
| user-scope: | |
| name: Install with User Scope | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [windows-latest, windows-2025] | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Nu | |
| uses: hustcer/setup-nu@v3 | |
| with: | |
| version: 'nightly' | |
| - name: Install Komac Tool | |
| shell: cmd | |
| run: | | |
| winget install komac --accept-source-agreements --accept-package-agreements --disable-interactivity | |
| - name: Test Winget Install with User Scope | |
| shell: nu {0} | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| nu tests/winget-install.nu --scope user | |
| machine-scope: | |
| name: Install with Machine Scope | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [windows-latest, windows-2025] | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Nu | |
| uses: hustcer/setup-nu@v3 | |
| with: | |
| version: 'nightly' | |
| - name: Install Komac Tool | |
| shell: cmd | |
| run: | | |
| winget install komac --accept-source-agreements --accept-package-agreements --disable-interactivity | |
| - name: Test Winget Install with Machine Scope | |
| shell: nu {0} | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| nu tests/winget-install.nu --scope machine |