Add task copy_xpath.ps1 for vscode [skip pch] #15
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: CI | |
| on: | |
| pull_request: | |
| push: | |
| jobs: | |
| windows: | |
| name: ${{ matrix.label }} | |
| runs-on: windows-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - label: Windows PowerShell 5.1 | |
| ps_exe: powershell | |
| - label: PowerShell 7 | |
| ps_exe: pwsh | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - name: Show PowerShell Version | |
| shell: pwsh | |
| run: | | |
| $exe = '${{ matrix.ps_exe }}' | |
| & $exe -NoProfile -Command '$PSVersionTable.PSVersion.ToString()' | |
| - name: Install Dependencies | |
| shell: pwsh | |
| run: | | |
| $exe = '${{ matrix.ps_exe }}' | |
| $installScript = @' | |
| if ($PSVersionTable.PSEdition -eq 'Desktop') { | |
| [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 | |
| $userModules = Join-Path $HOME 'Documents\WindowsPowerShell\Modules' | |
| } else { | |
| $userModules = Join-Path $HOME 'Documents/PowerShell/Modules' | |
| } | |
| if ($env:PSModulePath -notlike "*$userModules*") { | |
| $env:PSModulePath = "$userModules;$env:PSModulePath" | |
| } | |
| Set-PSRepository PSGallery -InstallationPolicy Trusted | |
| Install-Module PSScriptAnalyzer -Scope CurrentUser -Force -AllowClobber | |
| Install-Module Pester -Scope CurrentUser -Force -SkipPublisherCheck | |
| '@ | |
| & $exe -NoProfile -Command $installScript | |
| - name: Run Lint and Tests | |
| shell: pwsh | |
| run: | | |
| $exe = '${{ matrix.ps_exe }}' | |
| & $exe -NoProfile -File .\tools\ci.ps1 -CurrentShellOnly |