Test Action #112
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: "Test Action" | |
| on: | |
| workflow_dispatch: | |
| schedule: | |
| - cron: 0 0 * * * | |
| push: | |
| branches: | |
| - main | |
| - develop | |
| pull_request: | |
| branches: | |
| - main | |
| - develop | |
| jobs: | |
| test-default: | |
| name: Test default and latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: | |
| - "windows-2022" | |
| - "windows-2025" | |
| - "windows-11-arm" | |
| - "windows-latest" | |
| winget-version: ["default", "latest"] | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Install winget | |
| id: setup-winget | |
| uses: ./ | |
| - name: Check Version | |
| shell: bash | |
| run: | | |
| VERSION="${{ steps.setup-winget.outputs.winget-version }}" | |
| if [ -z "$VERSION" ]; then | |
| exit 1 | |
| fi | |
| echo $VERSION | |
| - name: Install wingetcreate | |
| run: winget install wingetcreate --disable-interactivity --accept-source-agreements --accept-package-agreements | |
| test-pinned: | |
| name: Test pinned version | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: | |
| - "windows-2022" | |
| - "windows-2025" | |
| - "windows-11-arm" | |
| - "windows-latest" | |
| winget-version: ["1.11.x", "1.9.25200", "<1.12"] | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - name: Echo Runner OS version | |
| shell: powershell | |
| run: (Get-WmiObject Win32_OperatingSystem).Caption | |
| - uses: actions/checkout@v5 | |
| - name: Install winget | |
| id: setup-winget | |
| uses: ./ | |
| with: | |
| winget-version: ${{ matrix.winget-version }} | |
| - name: Check Version | |
| shell: bash | |
| run: | | |
| npx semver -r '${{ matrix.winget-version }}' '${{ steps.setup-winget.outputs.winget-version }}' |