Update project to .NET 9.0 and dependencies #32
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: Test | |
| on: | |
| push: | |
| branches: ["main"] | |
| paths: | |
| - "Module/**" | |
| - "Predictor/**" | |
| - "Build.ps1" | |
| pull_request: | |
| branches: ["main"] | |
| jobs: | |
| test: | |
| name: Pester test (${{ matrix.os }}) | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, windows-latest] | |
| steps: | |
| - name: Checkout Repository Code | |
| uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 1 # Fetch only the latest commit to speed up the checkout process | |
| - name: Setup .NET | |
| uses: actions/setup-dotnet@v5 | |
| with: | |
| dotnet-version: 9.0.x | |
| - name: Build Module | |
| shell: pwsh | |
| run: ./Build.ps1 -Configuration Release | |
| - name: Create Config Directory and File (Linux) | |
| if: runner.os == 'Linux' | |
| run: | | |
| mkdir -p ~/.local/share/PSFavorite | |
| echo '' > ~/.local/share/PSFavorite/Favorites.txt | |
| - name: Create Config Directory and File (Windows) | |
| if: runner.os == 'Windows' | |
| shell: pwsh | |
| run: | | |
| $configPath = "$env:LOCALAPPDATA\PSFavorite" | |
| New-Item -ItemType Directory -Path $configPath -Force | Out-Null | |
| New-Item -ItemType File -Path "$configPath\Favorites.txt" -Force | Out-Null | |
| - name: Run Tests | |
| shell: pwsh | |
| run: | | |
| Import-Module ./Module/PSFavorite.psd1 -Force | |
| Invoke-Pester -Path ./Module/Tests -Output Detailed -PassThru |