-
-
Notifications
You must be signed in to change notification settings - Fork 2
ci: powershell compatibility test #12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
36 commits
Select commit
Hold shift + click to select a range
dca2b5f
show powershell info
vaind 9ce0615
run on windows 2019
vaind 19b7924
powershell setup action
vaind b08945b
fixup
vaind c8c6056
fixup
vaind 4b2ab3d
improve checks
vaind 6eefe4d
improve test names
vaind d7f7553
cleanup
vaind 0489b2a
more info
vaind ab8ab00
job name
vaind cc17d08
print version
vaind f53d9cb
try to fix 6.0
vaind 47f4a38
fix syntax
vaind 81e3e91
fix order
vaind 4a19204
try to fix pwsh 6
vaind 6e5210b
set error action preference
vaind 14a4e41
try fixing 6.0
vaind e8bea2f
try to fix v6
vaind a297240
6.0 custom tests
vaind 1888edb
try to fix tests on 6.1
vaind 2ae54a7
deduplicate settings
vaind 34a40ff
hide Load assembly success stream output
vaind c14ea9a
fixup tests
vaind 30455e0
enable debug logging in CI
vaind 266b366
try to fix 6.0+
vaind 4a05e51
fix stj assembly version for netstandard 2.0
vaind 9b1905f
add missing dep
vaind 90c21d5
change 6.1 testing
vaind 64e8594
syntax error
vaind 9e4d22c
missing deps
vaind 755aaed
formatting
vaind 2a4b246
try loading assemblies manually
vaind 002b20d
logging
vaind 998116f
logging fix
vaind 81c55a3
test output log
vaind 950ca15
disable broken CI versions
vaind File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
name: Setup dependencies | ||
description: Download dependent libraries | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
name: Setup PowerShell | ||
description: Setup PowerShell (Core) at a given version | ||
inputs: | ||
version: | ||
description: Powershell version to install | ||
required: true | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
# Download the powershell '.tar.gz' archive | ||
- run: curl -L -o /tmp/powershell.tar.gz https://github.com/PowerShell/PowerShell/releases/download/v${{ inputs.version }}/powershell-${{ inputs.version }}-linux-x64.tar.gz | ||
shell: bash | ||
|
||
# Create the target folder where powershell will be placed | ||
- run: sudo mkdir -p /opt/microsoft/powershell/${{ inputs.version }} | ||
shell: bash | ||
|
||
# Expand powershell to the target folder | ||
- run: sudo tar zxf /tmp/powershell.tar.gz -C /opt/microsoft/powershell/${{ inputs.version }} | ||
shell: bash | ||
|
||
# Set execute permissions | ||
- run: sudo chmod +x /opt/microsoft/powershell/${{ inputs.version }}/pwsh | ||
shell: bash | ||
|
||
# Unlink the original pwsh binary already present in the system | ||
- run: sudo unlink /usr/bin/pwsh | ||
shell: bash | ||
|
||
# Create the symbolic link that points to pwsh | ||
- run: sudo ln -s /opt/microsoft/powershell/${{ inputs.version }}/pwsh /usr/bin/pwsh | ||
shell: bash | ||
|
||
# Verify the installation by checking the `pwsh` command version. | ||
- run: | | ||
pwsh --version | ||
[[ "$(pwsh --version)" == "PowerShell ${{ inputs.version == '6.0.0' && 'v6.0.0' || inputs.version }}" ]] | ||
shell: bash | ||
|
||
# Setup old OpenSSL necessary for .NET Core 2.1. | ||
- if: ${{ startsWith(inputs.version, '6.') }} | ||
shell: bash | ||
run: | | ||
wget http://archive.ubuntu.com/ubuntu/pool/main/o/openssl1.0/libssl1.0.0_1.0.2n-1ubuntu5_amd64.deb | ||
sudo dpkg -i libssl1.0.0_1.0.2n-1ubuntu5_amd64.deb | ||
|
||
# Verify the installation by using the `pwsh` shell. | ||
- run: | | ||
$PSVersionTable | ||
if ( $PSVersionTable.PSVersion.ToString() -ne "${{ inputs.version }}" ) { exit 1 } | ||
shell: pwsh |
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# Common settings - use this in all scripts by sourcing: `. ./tools/settings.ps1` | ||
Set-StrictMode -Version latest | ||
$ErrorActionPreference = 'Stop' | ||
$PSNativeCommandUseErrorActionPreference = $true | ||
Check warningCode scanning / PSScriptAnalyzer The variable 'PSNativeCommandUseErrorActionPreference' is assigned but never used.
The variable 'PSNativeCommandUseErrorActionPreference' is assigned but never used.
|
||
|
||
# Enable debug logging in CI | ||
if (Test-Path env:CI) | ||
{ | ||
$DebugPreference = 'Continue' | ||
} |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.