You've already forked setup-dotnet
mirror of
https://github.com/actions/setup-dotnet.git
synced 2025-07-11 01:20:33 +07:00
Compare commits
52 Commits
update-cod
...
v3.1.0
Author | SHA1 | Date | |
---|---|---|---|
aa983c550d | |||
b891376106 | |||
b05a3f26b3 | |||
5fdecd2063 | |||
38b49fb717 | |||
3cf3e230c1 | |||
83a1653fa3 | |||
898aa0ce4d | |||
2f028bc044 | |||
21cf89aa73 | |||
fefaa59d2e | |||
e8501859aa | |||
426d75d071 | |||
0f534f5829 | |||
fbdbede901 | |||
0bc43909e0 | |||
c5a57b219c | |||
6adeb768ce | |||
f425be78f5 | |||
fc8786b149 | |||
7d08dc7593 | |||
e0a32d6459 | |||
255362be61 | |||
50b46b3b1d | |||
e8ac21d503 | |||
a79ce57e6b | |||
180a15970f | |||
b72f430d36 | |||
559e47b01b | |||
7358a44590 | |||
34c30d0e81 | |||
5f570676c2 | |||
aa34a3ceaa | |||
12f70884d7 | |||
0318091611 | |||
f199d27aa1 | |||
660c25a321 | |||
4f6b2f576a | |||
920b830bd1 | |||
abdd14ee80 | |||
1d9f0dad5b | |||
2699274f6e | |||
ca579e0fb2 | |||
c82240598b | |||
926f442022 | |||
c41fd15071 | |||
0c8652569e | |||
3cf27f13bb | |||
ae8edb8fff | |||
82b2b40816 | |||
fe74f1cb7d | |||
e94d154672 |
6
.eslintignore
Normal file
6
.eslintignore
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
# Ignore list
|
||||||
|
/*
|
||||||
|
|
||||||
|
# Do not ignore these folders:
|
||||||
|
!__tests__/
|
||||||
|
!src/
|
50
.eslintrc.js
Normal file
50
.eslintrc.js
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
// This is a reusable configuration file copied from https://github.com/actions/reusable-workflows/tree/main/reusable-configurations. Please don't make changes to this file as it's the subject of an automatic update.
|
||||||
|
module.exports = {
|
||||||
|
extends: [
|
||||||
|
'eslint:recommended',
|
||||||
|
'plugin:@typescript-eslint/recommended',
|
||||||
|
'plugin:eslint-plugin-jest/recommended',
|
||||||
|
'eslint-config-prettier'
|
||||||
|
],
|
||||||
|
parser: '@typescript-eslint/parser',
|
||||||
|
plugins: ['@typescript-eslint', 'eslint-plugin-jest'],
|
||||||
|
rules: {
|
||||||
|
'@typescript-eslint/no-require-imports': 'error',
|
||||||
|
'@typescript-eslint/no-non-null-assertion': 'off',
|
||||||
|
'@typescript-eslint/no-explicit-any': 'off',
|
||||||
|
'@typescript-eslint/no-empty-function': 'off',
|
||||||
|
'@typescript-eslint/ban-ts-comment': [
|
||||||
|
'error',
|
||||||
|
{
|
||||||
|
'ts-ignore': 'allow-with-description'
|
||||||
|
}
|
||||||
|
],
|
||||||
|
'no-console': 'error',
|
||||||
|
'yoda': 'error',
|
||||||
|
'prefer-const': [
|
||||||
|
'error',
|
||||||
|
{
|
||||||
|
destructuring: 'all'
|
||||||
|
}
|
||||||
|
],
|
||||||
|
'no-control-regex': 'off',
|
||||||
|
'no-constant-condition': ['error', {checkLoops: false}]
|
||||||
|
},
|
||||||
|
overrides: [
|
||||||
|
{
|
||||||
|
files: ['**/*{test,spec}.ts'],
|
||||||
|
rules: {
|
||||||
|
'@typescript-eslint/no-unused-vars': 'off',
|
||||||
|
'jest/no-standalone-expect': 'off',
|
||||||
|
'jest/no-conditional-expect': 'off',
|
||||||
|
'no-console': 'off',
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
env: {
|
||||||
|
node: true,
|
||||||
|
es6: true,
|
||||||
|
'jest/globals': true
|
||||||
|
}
|
||||||
|
};
|
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -1 +1,2 @@
|
|||||||
|
* text=auto eol=lf
|
||||||
.licenses/** -diff linguist-generated=true
|
.licenses/** -diff linguist-generated=true
|
||||||
|
2
.github/CODEOWNERS
vendored
2
.github/CODEOWNERS
vendored
@ -1 +1 @@
|
|||||||
* @actions/runner-images-team
|
* @actions/setup-actions-team
|
||||||
|
4
.github/workflows/codeql-analysis.yml
vendored
4
.github/workflows/codeql-analysis.yml
vendored
@ -2,9 +2,9 @@ name: CodeQL analysis
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [ main ]
|
branches: [main]
|
||||||
pull_request:
|
pull_request:
|
||||||
branches: [ main ]
|
branches: [main]
|
||||||
schedule:
|
schedule:
|
||||||
- cron: '0 3 * * 0'
|
- cron: '0 3 * * 0'
|
||||||
|
|
||||||
|
119
.github/workflows/e2e-tests.yml
vendored
119
.github/workflows/e2e-tests.yml
vendored
@ -24,7 +24,7 @@ jobs:
|
|||||||
- name: Clear toolcache
|
- name: Clear toolcache
|
||||||
shell: pwsh
|
shell: pwsh
|
||||||
run: __tests__/clear-toolcache.ps1 ${{ runner.os }}
|
run: __tests__/clear-toolcache.ps1 ${{ runner.os }}
|
||||||
- name: Setup dotnet 2.2.402 and 3.1.404
|
- name: Setup dotnet 2.2.402, 3.1.404 and 3.0.x
|
||||||
uses: ./
|
uses: ./
|
||||||
with:
|
with:
|
||||||
dotnet-version: |
|
dotnet-version: |
|
||||||
@ -33,7 +33,7 @@ jobs:
|
|||||||
3.0.x
|
3.0.x
|
||||||
- name: Verify dotnet
|
- name: Verify dotnet
|
||||||
shell: pwsh
|
shell: pwsh
|
||||||
run: __tests__/verify-dotnet.ps1 2.2.402 3.1.404 '3.0'
|
run: __tests__/verify-dotnet.ps1 -Patterns "^2.2.402$", "^3.1.404$", "^3.0"
|
||||||
|
|
||||||
test-setup-full-version:
|
test-setup-full-version:
|
||||||
runs-on: ${{ matrix.operating-system }}
|
runs-on: ${{ matrix.operating-system }}
|
||||||
@ -60,13 +60,9 @@ jobs:
|
|||||||
source-url: https://api.nuget.org/v3/index.json
|
source-url: https://api.nuget.org/v3/index.json
|
||||||
env:
|
env:
|
||||||
NUGET_AUTH_TOKEN: NOTATOKEN
|
NUGET_AUTH_TOKEN: NOTATOKEN
|
||||||
- name: Verify nuget config file
|
|
||||||
shell: pwsh
|
|
||||||
run: |
|
|
||||||
if (-Not (Test-Path "../nuget.config")) { throw "nuget file not generated correctly" }
|
|
||||||
- name: Verify dotnet
|
- name: Verify dotnet
|
||||||
shell: pwsh
|
shell: pwsh
|
||||||
run: __tests__/verify-dotnet.ps1 3.1.201 2.2.402
|
run: __tests__/verify-dotnet.ps1 -Patterns "^3.1.201$", "^2.2.402$" -CheckNugetConfig
|
||||||
|
|
||||||
test-setup-without-patch-version:
|
test-setup-without-patch-version:
|
||||||
runs-on: ${{ matrix.operating-system }}
|
runs-on: ${{ matrix.operating-system }}
|
||||||
@ -91,7 +87,7 @@ jobs:
|
|||||||
dotnet-version: '2.2'
|
dotnet-version: '2.2'
|
||||||
- name: Verify dotnet
|
- name: Verify dotnet
|
||||||
shell: pwsh
|
shell: pwsh
|
||||||
run: __tests__/verify-dotnet.ps1 3.1 2.2
|
run: __tests__/verify-dotnet.ps1 -Patterns "^3.1", "^2.2"
|
||||||
|
|
||||||
test-setup-prerelease-version:
|
test-setup-prerelease-version:
|
||||||
runs-on: ${{ matrix.operating-system }}
|
runs-on: ${{ matrix.operating-system }}
|
||||||
@ -105,17 +101,13 @@ jobs:
|
|||||||
- name: Clear toolcache
|
- name: Clear toolcache
|
||||||
shell: pwsh
|
shell: pwsh
|
||||||
run: __tests__/clear-toolcache.ps1 ${{ runner.os }}
|
run: __tests__/clear-toolcache.ps1 ${{ runner.os }}
|
||||||
- name: Setup dotnet '2.2'
|
|
||||||
uses: ./
|
|
||||||
with:
|
|
||||||
dotnet-version: '2.2'
|
|
||||||
- name: Setup dotnet '3.1.100-preview1-014459'
|
- name: Setup dotnet '3.1.100-preview1-014459'
|
||||||
uses: ./
|
uses: ./
|
||||||
with:
|
with:
|
||||||
dotnet-version: '3.1.100-preview1-014459'
|
dotnet-version: '3.1.100-preview1-014459'
|
||||||
- name: Verify dotnet
|
- name: Verify dotnet
|
||||||
shell: pwsh
|
shell: pwsh
|
||||||
run: __tests__/verify-dotnet.ps1 3.1.100-preview1-014459
|
run: __tests__/verify-dotnet.ps1 -Patterns "3.1.100-preview1-014459"
|
||||||
|
|
||||||
test-setup-latest-patch-version:
|
test-setup-latest-patch-version:
|
||||||
runs-on: ${{ matrix.operating-system }}
|
runs-on: ${{ matrix.operating-system }}
|
||||||
@ -139,7 +131,28 @@ jobs:
|
|||||||
dotnet-version: 2.2.X
|
dotnet-version: 2.2.X
|
||||||
- name: Verify dotnet
|
- name: Verify dotnet
|
||||||
shell: pwsh
|
shell: pwsh
|
||||||
run: __tests__/verify-dotnet.ps1 '2.2' '3.1'
|
run: __tests__/verify-dotnet.ps1 -Patterns "^2.2", "^3.1"
|
||||||
|
|
||||||
|
test-ABCxx-syntax:
|
||||||
|
runs-on: ${{ matrix.operating-system }}
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
operating-system: [ubuntu-latest, windows-latest, macOS-latest]
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
- name: Clear toolcache
|
||||||
|
shell: pwsh
|
||||||
|
run: __tests__/clear-toolcache.ps1 ${{ runner.os }}
|
||||||
|
|
||||||
|
- name: Setup dotnet 6.0.4xx
|
||||||
|
uses: ./
|
||||||
|
with:
|
||||||
|
dotnet-version: '6.0.4xx'
|
||||||
|
- name: Verify dotnet
|
||||||
|
shell: pwsh
|
||||||
|
run: __tests__/verify-dotnet.ps1 -Patterns "^6\.0\.4\d{2}"
|
||||||
|
|
||||||
test-setup-with-wildcard:
|
test-setup-with-wildcard:
|
||||||
runs-on: ${{ matrix.operating-system }}
|
runs-on: ${{ matrix.operating-system }}
|
||||||
@ -163,7 +176,7 @@ jobs:
|
|||||||
dotnet-version: 2.2.*
|
dotnet-version: 2.2.*
|
||||||
- name: Verify dotnet
|
- name: Verify dotnet
|
||||||
shell: pwsh
|
shell: pwsh
|
||||||
run: __tests__/verify-dotnet.ps1 3.1 2.2
|
run: __tests__/verify-dotnet.ps1 -Patterns "^3.1", "^2.2"
|
||||||
|
|
||||||
test-setup-global-json-specified-and-version:
|
test-setup-global-json-specified-and-version:
|
||||||
runs-on: ${{ matrix.operating-system }}
|
runs-on: ${{ matrix.operating-system }}
|
||||||
@ -181,7 +194,7 @@ jobs:
|
|||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
mkdir subdirectory
|
mkdir subdirectory
|
||||||
echo '{"sdk":{"version": "2.2","rollForward": "latestFeature"}}' > ./subdirectory/global.json
|
echo '{"sdk":{"version": "2.2.207","rollForward": "latestFeature"}}' > ./subdirectory/global.json
|
||||||
- name: Setup dotnet
|
- name: Setup dotnet
|
||||||
uses: ./
|
uses: ./
|
||||||
with:
|
with:
|
||||||
@ -189,7 +202,32 @@ jobs:
|
|||||||
global-json-file: ./subdirectory/global.json
|
global-json-file: ./subdirectory/global.json
|
||||||
- name: Verify dotnet
|
- name: Verify dotnet
|
||||||
shell: pwsh
|
shell: pwsh
|
||||||
run: __tests__/verify-dotnet.ps1 2.2 3.1
|
run: __tests__/verify-dotnet.ps1 -Patterns "^2.2", "^3.1"
|
||||||
|
|
||||||
|
test-setup-global-json-only:
|
||||||
|
runs-on: ${{ matrix.operating-system }}
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
operating-system: [ubuntu-latest, windows-latest, macOS-latest]
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
- name: Clear toolcache
|
||||||
|
shell: pwsh
|
||||||
|
run: __tests__/clear-toolcache.ps1 ${{ runner.os }}
|
||||||
|
- name: Write global.json
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
mkdir subdirectory
|
||||||
|
echo '{"sdk":{"version": "2.2.207","rollForward": "latestFeature"}}' > ./subdirectory/global.json
|
||||||
|
- name: Setup dotnet
|
||||||
|
uses: ./
|
||||||
|
with:
|
||||||
|
global-json-file: ./subdirectory/global.json
|
||||||
|
- name: Verify dotnet
|
||||||
|
shell: pwsh
|
||||||
|
run: __tests__/verify-dotnet.ps1 -Patterns "^2.2"
|
||||||
|
|
||||||
test-setup-with-dotnet-quality:
|
test-setup-with-dotnet-quality:
|
||||||
runs-on: ${{ matrix.operating-system }}
|
runs-on: ${{ matrix.operating-system }}
|
||||||
@ -207,14 +245,11 @@ jobs:
|
|||||||
- name: Setup dotnet 7.0 with preview quality
|
- name: Setup dotnet 7.0 with preview quality
|
||||||
uses: ./
|
uses: ./
|
||||||
with:
|
with:
|
||||||
dotnet-version: "7.0"
|
dotnet-version: '7.0'
|
||||||
dotnet-quality: "preview"
|
dotnet-quality: 'preview'
|
||||||
- name: Verify preview version
|
- name: Verify dotnet
|
||||||
shell: pwsh
|
shell: pwsh
|
||||||
run: |
|
run: __tests__/verify-dotnet.ps1 -Patterns "^7\.0\.\d+-"
|
||||||
$version = & dotnet --version
|
|
||||||
Write-Host "Installed version: $version"
|
|
||||||
if (-not ($version.Contains("preview") -or $version.Contains("rc"))) { throw "Unexpected version" }
|
|
||||||
|
|
||||||
test-dotnet-version-output-during-single-version-installation:
|
test-dotnet-version-output-during-single-version-installation:
|
||||||
runs-on: ${{ matrix.operating-system }}
|
runs-on: ${{ matrix.operating-system }}
|
||||||
@ -233,7 +268,7 @@ jobs:
|
|||||||
uses: ./
|
uses: ./
|
||||||
id: step1
|
id: step1
|
||||||
with:
|
with:
|
||||||
dotnet-version: "6.0.401"
|
dotnet-version: '6.0.401'
|
||||||
|
|
||||||
- name: Verify value of the dotnet-version output
|
- name: Verify value of the dotnet-version output
|
||||||
shell: pwsh
|
shell: pwsh
|
||||||
@ -273,7 +308,7 @@ jobs:
|
|||||||
test-proxy:
|
test-proxy:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container:
|
container:
|
||||||
image: mcr.microsoft.com/dotnet/core/runtime-deps:3.0-bionic
|
image: ubuntu:latest
|
||||||
options: --dns 127.0.0.1
|
options: --dns 127.0.0.1
|
||||||
services:
|
services:
|
||||||
squid-proxy:
|
squid-proxy:
|
||||||
@ -286,21 +321,29 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
- name: Clear tool cache
|
- name: Install Powershell
|
||||||
run: rm -rf "/usr/share/dotnet"
|
|
||||||
- name: Install curl
|
|
||||||
run: |
|
run: |
|
||||||
apt update
|
apt-get update
|
||||||
apt -y install curl
|
apt-get install -y wget apt-transport-https software-properties-common
|
||||||
- name: Setup dotnet 3.1.201
|
wget -q "https://packages.microsoft.com/config/ubuntu/$(lsb_release -rs)/packages-microsoft-prod.deb"
|
||||||
|
dpkg -i packages-microsoft-prod.deb
|
||||||
|
rm packages-microsoft-prod.deb
|
||||||
|
apt-get update
|
||||||
|
apt-get install -y powershell
|
||||||
|
- name: Clear toolcache
|
||||||
|
shell: pwsh
|
||||||
|
run: __tests__/clear-toolcache.ps1 ${{ runner.os }}
|
||||||
|
- name: Setup dotnet 6.0
|
||||||
uses: ./
|
uses: ./
|
||||||
with:
|
with:
|
||||||
dotnet-version: 3.1.201
|
dotnet-version: 6.0
|
||||||
source-url: https://api.nuget.org/v3/index.json
|
source-url: https://api.nuget.org/v3/index.json
|
||||||
env:
|
env:
|
||||||
NUGET_AUTH_TOKEN: NOTATOKEN
|
NUGET_AUTH_TOKEN: NOTATOKEN
|
||||||
- name: Verify dotnet
|
- name: Verify dotnet
|
||||||
run: __tests__/verify-dotnet.sh 3.1.201
|
shell: pwsh
|
||||||
|
run: |
|
||||||
|
__tests__/verify-dotnet.ps1 -Patterns "^6.0" -CheckNugetConfig
|
||||||
|
|
||||||
test-bypass-proxy:
|
test-bypass-proxy:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
@ -310,8 +353,9 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
- name: Clear tool cache
|
- name: Clear toolcache
|
||||||
run: rm -rf "/usr/share/dotnet"
|
shell: pwsh
|
||||||
|
run: __tests__/clear-toolcache.ps1 ${{ runner.os }}
|
||||||
- name: Setup dotnet 3.1.201
|
- name: Setup dotnet 3.1.201
|
||||||
uses: ./
|
uses: ./
|
||||||
with:
|
with:
|
||||||
@ -320,4 +364,5 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
NUGET_AUTH_TOKEN: NOTATOKEN
|
NUGET_AUTH_TOKEN: NOTATOKEN
|
||||||
- name: Verify dotnet
|
- name: Verify dotnet
|
||||||
run: __tests__/verify-dotnet.sh 3.1.201
|
shell: pwsh
|
||||||
|
run: __tests__/verify-dotnet.ps1 -Patterns "^3.1.201$" -CheckNugetConfig
|
||||||
|
@ -23,7 +23,7 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- name: Update the ${{ env.TAG_NAME }} tag
|
- name: Update the ${{ env.TAG_NAME }} tag
|
||||||
id: update-major-tag
|
id: update-major-tag
|
||||||
uses: actions/publish-action@v0.2.1
|
uses: actions/publish-action@v0.2.2
|
||||||
with:
|
with:
|
||||||
source-tag: ${{ env.TAG_NAME }}
|
source-tag: ${{ env.TAG_NAME }}
|
||||||
slack-webhook: ${{ secrets.SLACK_WEBHOOK }}
|
slack-webhook: ${{ secrets.SLACK_WEBHOOK }}
|
8
.github/workflows/test-dotnet.yml
vendored
8
.github/workflows/test-dotnet.yml
vendored
@ -18,7 +18,7 @@ jobs:
|
|||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
operating-system: [ubuntu-latest, windows-latest, macOS-latest]
|
operating-system: [ubuntu-latest, windows-latest, macOS-latest]
|
||||||
dotnet-version: ['2.1', '2.2', '3.0', '3.1', '5.0']
|
dotnet-version: ['2.1', '2.2', '3.0', '3.1', '5.0', '6.0', '7.0', '8.0']
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
@ -29,9 +29,7 @@ jobs:
|
|||||||
uses: ./
|
uses: ./
|
||||||
with:
|
with:
|
||||||
dotnet-version: ${{ matrix.dotnet-version }}
|
dotnet-version: ${{ matrix.dotnet-version }}
|
||||||
- name: Check installed version
|
- name: Verify installed version
|
||||||
shell: pwsh
|
shell: pwsh
|
||||||
run: |
|
run: |
|
||||||
$version = & dotnet --version
|
__tests__/verify-dotnet.ps1 -Patterns "^${{ matrix.dotnet-version }}"
|
||||||
Write-Host "Installed version: $version"
|
|
||||||
if (-not $version.StartsWith("${{ matrix.dotnet-version }}")) { throw "Unexpected version" }
|
|
||||||
|
11
.github/workflows/update-config-files.yml
vendored
Normal file
11
.github/workflows/update-config-files.yml
vendored
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
name: Update configuration files
|
||||||
|
|
||||||
|
on:
|
||||||
|
schedule:
|
||||||
|
- cron: '0 3 * * 0'
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
call-update-configuration-files:
|
||||||
|
name: Update configuration files
|
||||||
|
uses: actions/reusable-workflows/.github/workflows/update-config-files.yml@main
|
4
.gitignore
vendored
4
.gitignore
vendored
@ -3,8 +3,8 @@ global.json
|
|||||||
lib/
|
lib/
|
||||||
node_modules/
|
node_modules/
|
||||||
__tests__/runner/*
|
__tests__/runner/*
|
||||||
__tests__/sample-csproj/bin/
|
__tests__/e2e-test-csproj/bin/
|
||||||
__tests__/sample-csproj/obj/
|
__tests__/e2e-test-csproj/obj/
|
||||||
|
|
||||||
# Rest of the file pulled from https://github.com/github/gitignore/blob/master/Node.gitignore
|
# Rest of the file pulled from https://github.com/github/gitignore/blob/master/Node.gitignore
|
||||||
# Logs
|
# Logs
|
||||||
|
@ -2,3 +2,4 @@
|
|||||||
. "$(dirname -- "$0")/_/husky.sh"
|
. "$(dirname -- "$0")/_/husky.sh"
|
||||||
|
|
||||||
npm run format
|
npm run format
|
||||||
|
npm run lint:fix
|
||||||
|
@ -3,3 +3,4 @@
|
|||||||
|
|
||||||
# Tests are not run at push time since they can take 2-4 minutes to complete
|
# Tests are not run at push time since they can take 2-4 minutes to complete
|
||||||
npm run format-check
|
npm run format-check
|
||||||
|
npm run lint
|
||||||
|
7
.prettierignore
Normal file
7
.prettierignore
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
# Ignore list
|
||||||
|
/*
|
||||||
|
|
||||||
|
# Do not ignore these folders:
|
||||||
|
!__tests__/
|
||||||
|
!.github/
|
||||||
|
!src/
|
11
.prettierrc.js
Normal file
11
.prettierrc.js
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
// This is a reusable configuration file copied from https://github.com/actions/reusable-workflows/tree/main/reusable-configurations. Please don't make changes to this file as it's the subject of an automatic update.
|
||||||
|
module.exports = {
|
||||||
|
printWidth: 80,
|
||||||
|
tabWidth: 2,
|
||||||
|
useTabs: false,
|
||||||
|
semi: true,
|
||||||
|
singleQuote: true,
|
||||||
|
trailingComma: 'none',
|
||||||
|
bracketSpacing: false,
|
||||||
|
arrowParens: 'avoid'
|
||||||
|
};
|
@ -1,12 +0,0 @@
|
|||||||
{
|
|
||||||
"printWidth": 80,
|
|
||||||
"tabWidth": 2,
|
|
||||||
"useTabs": false,
|
|
||||||
"semi": true,
|
|
||||||
"singleQuote": true,
|
|
||||||
"trailingComma": "none",
|
|
||||||
"bracketSpacing": false,
|
|
||||||
"arrowParens": "avoid",
|
|
||||||
"parser": "typescript",
|
|
||||||
"endOfLine": "auto"
|
|
||||||
}
|
|
@ -1,6 +1,7 @@
|
|||||||
# setup-dotnet
|
# setup-dotnet
|
||||||
|
|
||||||
[](https://github.com/actions/setup-dotnet)
|
[](https://github.com/actions/setup-dotnet/actions/workflows/basic-validation.yml)
|
||||||
|
[](https://github.com/actions/setup-dotnet/actions/workflows/e2e-tests.yml)
|
||||||
|
|
||||||
This action sets up a [.NET CLI](https://github.com/dotnet/sdk) environment for use in actions by:
|
This action sets up a [.NET CLI](https://github.com/dotnet/sdk) environment for use in actions by:
|
||||||
|
|
||||||
@ -48,12 +49,13 @@ The `dotnet-version` input supports following syntax:
|
|||||||
- **A.B.C** (e.g 6.0.400, 7.0.100-preview.7.22377.5) - installs exact version of .NET SDK
|
- **A.B.C** (e.g 6.0.400, 7.0.100-preview.7.22377.5) - installs exact version of .NET SDK
|
||||||
- **A.B** or **A.B.x** (e.g. 3.1, 3.1.x) - installs the latest patch version of .NET SDK on the channel `3.1`, including prerelease versions (preview, rc)
|
- **A.B** or **A.B.x** (e.g. 3.1, 3.1.x) - installs the latest patch version of .NET SDK on the channel `3.1`, including prerelease versions (preview, rc)
|
||||||
- **A** or **A.x** (e.g. 3, 3.x) - installs the latest minor version of the specified major tag, including prerelease versions (preview, rc)
|
- **A** or **A.x** (e.g. 3, 3.x) - installs the latest minor version of the specified major tag, including prerelease versions (preview, rc)
|
||||||
|
- **A.B.Cxx** (e.g. 6.0.4xx) - available since `.NET 5.0` release. Installs the latest version of the specific SDK release, including prerelease versions (preview, rc).
|
||||||
|
|
||||||
|
|
||||||
## Using the `dotnet-quality` input
|
## Using the `dotnet-quality` input
|
||||||
This input sets up the action to install the latest build of the specified quality in the channel. The possible values of `dotnet-quality` are: **daily**, **signed**, **validated**, **preview**, **ga**.
|
This input sets up the action to install the latest build of the specified quality in the channel. The possible values of `dotnet-quality` are: **daily**, **signed**, **validated**, **preview**, **ga**.
|
||||||
|
|
||||||
> **Note**: `dotnet-quality` input can be used only with .NET SDK version in 'A.B', 'A.B.x', 'A' and 'A.x' formats where the major version is higher than 5. In other cases, `dotnet-quality` input will be ignored.
|
> **Note**: `dotnet-quality` input can be used only with .NET SDK version in 'A.B', 'A.B.x', 'A', 'A.x' and 'A.B.Cxx' formats where the major version is higher than 5. In other cases, `dotnet-quality` input will be ignored.
|
||||||
|
|
||||||
```yml
|
```yml
|
||||||
steps:
|
steps:
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||||
|
|
||||||
exports[`authutil tests Existing config not in repo root, sets up a partial NuGet.config user/PAT for GPR 1`] = `
|
exports[`authutil tests existing config not in repo root, sets up a partial NuGet.config user/PAT for GPR 1`] = `
|
||||||
"<?xml version=\\"1.0\\"?>
|
"<?xml version=\\"1.0\\"?>
|
||||||
<configuration>
|
<configuration>
|
||||||
<config>
|
<config>
|
||||||
@ -15,7 +15,7 @@ exports[`authutil tests Existing config not in repo root, sets up a partial NuGe
|
|||||||
</configuration>"
|
</configuration>"
|
||||||
`;
|
`;
|
||||||
|
|
||||||
exports[`authutil tests Existing config w/ Azure Artifacts source and NuGet.org, sets up a partial NuGet.config user/PAT for GPR 1`] = `
|
exports[`authutil tests existing config w/ Azure Artifacts source and NuGet.org, sets up a partial NuGet.config user/PAT for GPR 1`] = `
|
||||||
"<?xml version=\\"1.0\\"?>
|
"<?xml version=\\"1.0\\"?>
|
||||||
<configuration>
|
<configuration>
|
||||||
<config>
|
<config>
|
||||||
@ -30,7 +30,7 @@ exports[`authutil tests Existing config w/ Azure Artifacts source and NuGet.org,
|
|||||||
</configuration>"
|
</configuration>"
|
||||||
`;
|
`;
|
||||||
|
|
||||||
exports[`authutil tests Existing config w/ GPR source and NuGet.org, sets up a partial NuGet.config user/PAT for GPR 1`] = `
|
exports[`authutil tests existing config w/ GPR source and NuGet.org, sets up a partial NuGet.config user/PAT for GPR 1`] = `
|
||||||
"<?xml version=\\"1.0\\"?>
|
"<?xml version=\\"1.0\\"?>
|
||||||
<configuration>
|
<configuration>
|
||||||
<config>
|
<config>
|
||||||
@ -45,7 +45,7 @@ exports[`authutil tests Existing config w/ GPR source and NuGet.org, sets up a p
|
|||||||
</configuration>"
|
</configuration>"
|
||||||
`;
|
`;
|
||||||
|
|
||||||
exports[`authutil tests Existing config w/ no GPR sources, sets up a full NuGet.config with URL and user/PAT for GPR 1`] = `
|
exports[`authutil tests existing config w/ no GPR sources, sets up a full NuGet.config with URL and user/PAT for GPR 1`] = `
|
||||||
"<?xml version=\\"1.0\\"?>
|
"<?xml version=\\"1.0\\"?>
|
||||||
<configuration>
|
<configuration>
|
||||||
<config>
|
<config>
|
||||||
@ -63,7 +63,7 @@ exports[`authutil tests Existing config w/ no GPR sources, sets up a full NuGet.
|
|||||||
</configuration>"
|
</configuration>"
|
||||||
`;
|
`;
|
||||||
|
|
||||||
exports[`authutil tests Existing config w/ no sources, sets up a full NuGet.config with URL and user/PAT for GPR 1`] = `
|
exports[`authutil tests existing config w/ no sources, sets up a full NuGet.config with URL and user/PAT for GPR 1`] = `
|
||||||
"<?xml version=\\"1.0\\"?>
|
"<?xml version=\\"1.0\\"?>
|
||||||
<configuration>
|
<configuration>
|
||||||
<config>
|
<config>
|
||||||
@ -81,7 +81,7 @@ exports[`authutil tests Existing config w/ no sources, sets up a full NuGet.conf
|
|||||||
</configuration>"
|
</configuration>"
|
||||||
`;
|
`;
|
||||||
|
|
||||||
exports[`authutil tests Existing config w/ only Azure Artifacts source, sets up a partial NuGet.config user/PAT for GPR 1`] = `
|
exports[`authutil tests existing config w/ only Azure Artifacts source, sets up a partial NuGet.config user/PAT for GPR 1`] = `
|
||||||
"<?xml version=\\"1.0\\"?>
|
"<?xml version=\\"1.0\\"?>
|
||||||
<configuration>
|
<configuration>
|
||||||
<config>
|
<config>
|
||||||
@ -96,7 +96,7 @@ exports[`authutil tests Existing config w/ only Azure Artifacts source, sets up
|
|||||||
</configuration>"
|
</configuration>"
|
||||||
`;
|
`;
|
||||||
|
|
||||||
exports[`authutil tests Existing config w/ only GPR source, sets up a partial NuGet.config user/PAT for GPR 1`] = `
|
exports[`authutil tests existing config w/ only GPR source, sets up a partial NuGet.config user/PAT for GPR 1`] = `
|
||||||
"<?xml version=\\"1.0\\"?>
|
"<?xml version=\\"1.0\\"?>
|
||||||
<configuration>
|
<configuration>
|
||||||
<config>
|
<config>
|
||||||
@ -111,7 +111,7 @@ exports[`authutil tests Existing config w/ only GPR source, sets up a partial Nu
|
|||||||
</configuration>"
|
</configuration>"
|
||||||
`;
|
`;
|
||||||
|
|
||||||
exports[`authutil tests Existing config w/ two GPR sources, sets up a partial NuGet.config user/PAT for GPR 1`] = `
|
exports[`authutil tests existing config w/ two GPR sources, sets up a partial NuGet.config user/PAT for GPR 1`] = `
|
||||||
"<?xml version=\\"1.0\\"?>
|
"<?xml version=\\"1.0\\"?>
|
||||||
<configuration>
|
<configuration>
|
||||||
<config>
|
<config>
|
||||||
@ -130,7 +130,7 @@ exports[`authutil tests Existing config w/ two GPR sources, sets up a partial Nu
|
|||||||
</configuration>"
|
</configuration>"
|
||||||
`;
|
`;
|
||||||
|
|
||||||
exports[`authutil tests No existing config, sets up a full NuGet.config with URL and other owner/PAT for GPR 1`] = `
|
exports[`authutil tests no existing config, sets up a full NuGet.config with URL and other owner/PAT for GPR 1`] = `
|
||||||
"<?xml version=\\"1.0\\"?>
|
"<?xml version=\\"1.0\\"?>
|
||||||
<configuration>
|
<configuration>
|
||||||
<config>
|
<config>
|
||||||
@ -148,7 +148,7 @@ exports[`authutil tests No existing config, sets up a full NuGet.config with URL
|
|||||||
</configuration>"
|
</configuration>"
|
||||||
`;
|
`;
|
||||||
|
|
||||||
exports[`authutil tests No existing config, sets up a full NuGet.config with URL and token for other source 1`] = `
|
exports[`authutil tests no existing config, sets up a full NuGet.config with URL and token for other source 1`] = `
|
||||||
"<?xml version=\\"1.0\\"?>
|
"<?xml version=\\"1.0\\"?>
|
||||||
<configuration>
|
<configuration>
|
||||||
<config>
|
<config>
|
||||||
@ -166,7 +166,7 @@ exports[`authutil tests No existing config, sets up a full NuGet.config with URL
|
|||||||
</configuration>"
|
</configuration>"
|
||||||
`;
|
`;
|
||||||
|
|
||||||
exports[`authutil tests No existing config, sets up a full NuGet.config with URL and user/PAT for GPR 1`] = `
|
exports[`authutil tests no existing config, sets up a full NuGet.config with URL and user/PAT for GPR 1`] = `
|
||||||
"<?xml version=\\"1.0\\"?>
|
"<?xml version=\\"1.0\\"?>
|
||||||
<configuration>
|
<configuration>
|
||||||
<config>
|
<config>
|
||||||
|
@ -9,20 +9,20 @@ const fakeSourcesDirForTesting = path.join(
|
|||||||
's'
|
's'
|
||||||
);
|
);
|
||||||
|
|
||||||
const invalidNuGetConfig: string = `<?xml version="1.0" encoding="utf-8"?>`;
|
const invalidNuGetConfig = `<?xml version="1.0" encoding="utf-8"?>`;
|
||||||
|
|
||||||
const emptyNuGetConfig: string = `<?xml version="1.0" encoding="utf-8"?>
|
const emptyNuGetConfig = `<?xml version="1.0" encoding="utf-8"?>
|
||||||
<configuration>
|
<configuration>
|
||||||
</configuration>`;
|
</configuration>`;
|
||||||
|
|
||||||
const nugetorgNuGetConfig: string = `<?xml version="1.0" encoding="utf-8"?>
|
const nugetorgNuGetConfig = `<?xml version="1.0" encoding="utf-8"?>
|
||||||
<configuration>
|
<configuration>
|
||||||
<packageSources>
|
<packageSources>
|
||||||
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
|
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
|
||||||
</packageSources>
|
</packageSources>
|
||||||
</configuration>`;
|
</configuration>`;
|
||||||
|
|
||||||
const gprnugetorgNuGetConfig: string = `<?xml version="1.0" encoding="utf-8"?>
|
const gprnugetorgNuGetConfig = `<?xml version="1.0" encoding="utf-8"?>
|
||||||
<configuration>
|
<configuration>
|
||||||
<packageSources>
|
<packageSources>
|
||||||
<add key="GPR" value="https://nuget.pkg.github.com/OwnerName/index.json" protocolVersion="3" />
|
<add key="GPR" value="https://nuget.pkg.github.com/OwnerName/index.json" protocolVersion="3" />
|
||||||
@ -30,14 +30,14 @@ const gprnugetorgNuGetConfig: string = `<?xml version="1.0" encoding="utf-8"?>
|
|||||||
</packageSources>
|
</packageSources>
|
||||||
</configuration>`;
|
</configuration>`;
|
||||||
|
|
||||||
const gprNuGetConfig: string = `<?xml version="1.0" encoding="utf-8"?>
|
const gprNuGetConfig = `<?xml version="1.0" encoding="utf-8"?>
|
||||||
<configuration>
|
<configuration>
|
||||||
<packageSources>
|
<packageSources>
|
||||||
<add key="GPR" value="https://nuget.pkg.github.com/OwnerName/index.json" protocolVersion="3" />
|
<add key="GPR" value="https://nuget.pkg.github.com/OwnerName/index.json" protocolVersion="3" />
|
||||||
</packageSources>
|
</packageSources>
|
||||||
</configuration>`;
|
</configuration>`;
|
||||||
|
|
||||||
const twogprNuGetConfig: string = `<?xml version="1.0" encoding="utf-8"?>
|
const twogprNuGetConfig = `<?xml version="1.0" encoding="utf-8"?>
|
||||||
<configuration>
|
<configuration>
|
||||||
<packageSources>
|
<packageSources>
|
||||||
<add key="GPR-GitHub" value="https://nuget.pkg.github.com/OwnerName/index.json" protocolVersion="3" />
|
<add key="GPR-GitHub" value="https://nuget.pkg.github.com/OwnerName/index.json" protocolVersion="3" />
|
||||||
@ -45,21 +45,21 @@ const twogprNuGetConfig: string = `<?xml version="1.0" encoding="utf-8"?>
|
|||||||
</packageSources>
|
</packageSources>
|
||||||
</configuration>`;
|
</configuration>`;
|
||||||
|
|
||||||
const spaceNuGetConfig: string = `<?xml version="1.0" encoding="utf-8"?>
|
const spaceNuGetConfig = `<?xml version="1.0" encoding="utf-8"?>
|
||||||
<configuration>
|
<configuration>
|
||||||
<packageSources>
|
<packageSources>
|
||||||
<add key="GPR GitHub" value="https://nuget.pkg.github.com/OwnerName/index.json" protocolVersion="3" />
|
<add key="GPR GitHub" value="https://nuget.pkg.github.com/OwnerName/index.json" protocolVersion="3" />
|
||||||
</packageSources>
|
</packageSources>
|
||||||
</configuration>`;
|
</configuration>`;
|
||||||
|
|
||||||
const azureartifactsNuGetConfig: string = `<?xml version="1.0" encoding="utf-8"?>
|
const azureartifactsNuGetConfig = `<?xml version="1.0" encoding="utf-8"?>
|
||||||
<configuration>
|
<configuration>
|
||||||
<packageSources>
|
<packageSources>
|
||||||
<add key="AzureArtifacts" value="https://pkgs.dev.azure.com/amullans/_packaging/GitHubBuilds/nuget/v3/index.json" protocolVersion="3" />
|
<add key="AzureArtifacts" value="https://pkgs.dev.azure.com/amullans/_packaging/GitHubBuilds/nuget/v3/index.json" protocolVersion="3" />
|
||||||
</packageSources>
|
</packageSources>
|
||||||
</configuration>`;
|
</configuration>`;
|
||||||
|
|
||||||
const azureartifactsnugetorgNuGetConfig: string = `<?xml version="1.0" encoding="utf-8"?>
|
const azureartifactsnugetorgNuGetConfig = `<?xml version="1.0" encoding="utf-8"?>
|
||||||
<configuration>
|
<configuration>
|
||||||
<packageSources>
|
<packageSources>
|
||||||
<add key="AzureArtifacts" value="https://pkgs.dev.azure.com/amullans/_packaging/GitHubBuilds/nuget/v3/index.json" protocolVersion="3" />
|
<add key="AzureArtifacts" value="https://pkgs.dev.azure.com/amullans/_packaging/GitHubBuilds/nuget/v3/index.json" protocolVersion="3" />
|
||||||
@ -91,9 +91,9 @@ describe('authutil tests', () => {
|
|||||||
process.env['NUGET_AUTH_TOKEN'] = '';
|
process.env['NUGET_AUTH_TOKEN'] = '';
|
||||||
});
|
});
|
||||||
|
|
||||||
it('No existing config, sets up a full NuGet.config with URL and user/PAT for GPR', async () => {
|
it('no existing config, sets up a full NuGet.config with URL and user/PAT for GPR', async () => {
|
||||||
process.env['NUGET_AUTH_TOKEN'] = 'TEST_FAKE_AUTH_TOKEN';
|
process.env['NUGET_AUTH_TOKEN'] = 'TEST_FAKE_AUTH_TOKEN';
|
||||||
await auth.configAuthentication(
|
auth.configAuthentication(
|
||||||
'https://nuget.pkg.github.com/OwnerName/index.json',
|
'https://nuget.pkg.github.com/OwnerName/index.json',
|
||||||
'',
|
'',
|
||||||
fakeSourcesDirForTesting
|
fakeSourcesDirForTesting
|
||||||
@ -104,10 +104,10 @@ describe('authutil tests', () => {
|
|||||||
).toMatchSnapshot();
|
).toMatchSnapshot();
|
||||||
});
|
});
|
||||||
|
|
||||||
it('No existing config, auth token environment variable not provided, throws', async () => {
|
it('no existing config, auth token environment variable not provided, throws', async () => {
|
||||||
let thrown = false;
|
let thrown = false;
|
||||||
try {
|
try {
|
||||||
await auth.configAuthentication(
|
auth.configAuthentication(
|
||||||
'https://nuget.pkg.github.com/OwnerName/index.json',
|
'https://nuget.pkg.github.com/OwnerName/index.json',
|
||||||
'',
|
'',
|
||||||
fakeSourcesDirForTesting
|
fakeSourcesDirForTesting
|
||||||
@ -118,10 +118,10 @@ describe('authutil tests', () => {
|
|||||||
expect(thrown).toBe(true);
|
expect(thrown).toBe(true);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('No existing config, sets up a full NuGet.config with URL and other owner/PAT for GPR', async () => {
|
it('no existing config, sets up a full NuGet.config with URL and other owner/PAT for GPR', async () => {
|
||||||
process.env['NUGET_AUTH_TOKEN'] = 'TEST_FAKE_AUTH_TOKEN';
|
process.env['NUGET_AUTH_TOKEN'] = 'TEST_FAKE_AUTH_TOKEN';
|
||||||
process.env['INPUT_OWNER'] = 'otherorg';
|
process.env['INPUT_OWNER'] = 'otherorg';
|
||||||
await auth.configAuthentication(
|
auth.configAuthentication(
|
||||||
'https://nuget.pkg.github.com/otherorg/index.json',
|
'https://nuget.pkg.github.com/otherorg/index.json',
|
||||||
'',
|
'',
|
||||||
fakeSourcesDirForTesting
|
fakeSourcesDirForTesting
|
||||||
@ -132,7 +132,7 @@ describe('authutil tests', () => {
|
|||||||
).toMatchSnapshot();
|
).toMatchSnapshot();
|
||||||
});
|
});
|
||||||
|
|
||||||
it('Existing config (invalid), tries to parse an invalid NuGet.config and throws', async () => {
|
it('existing config (invalid), tries to parse an invalid NuGet.config and throws', async () => {
|
||||||
process.env['NUGET_AUTH_TOKEN'] = 'TEST_FAKE_AUTH_TOKEN';
|
process.env['NUGET_AUTH_TOKEN'] = 'TEST_FAKE_AUTH_TOKEN';
|
||||||
const inputNuGetConfigPath: string = path.join(
|
const inputNuGetConfigPath: string = path.join(
|
||||||
fakeSourcesDirForTesting,
|
fakeSourcesDirForTesting,
|
||||||
@ -141,7 +141,7 @@ describe('authutil tests', () => {
|
|||||||
fs.writeFileSync(inputNuGetConfigPath, invalidNuGetConfig);
|
fs.writeFileSync(inputNuGetConfigPath, invalidNuGetConfig);
|
||||||
let thrown = false;
|
let thrown = false;
|
||||||
try {
|
try {
|
||||||
await auth.configAuthentication(
|
auth.configAuthentication(
|
||||||
'https://nuget.pkg.github.com/OwnerName/index.json',
|
'https://nuget.pkg.github.com/OwnerName/index.json',
|
||||||
'',
|
'',
|
||||||
fakeSourcesDirForTesting
|
fakeSourcesDirForTesting
|
||||||
@ -152,14 +152,14 @@ describe('authutil tests', () => {
|
|||||||
expect(thrown).toBe(true);
|
expect(thrown).toBe(true);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('Existing config w/ no sources, sets up a full NuGet.config with URL and user/PAT for GPR', async () => {
|
it('existing config w/ no sources, sets up a full NuGet.config with URL and user/PAT for GPR', async () => {
|
||||||
process.env['NUGET_AUTH_TOKEN'] = 'TEST_FAKE_AUTH_TOKEN';
|
process.env['NUGET_AUTH_TOKEN'] = 'TEST_FAKE_AUTH_TOKEN';
|
||||||
const inputNuGetConfigPath: string = path.join(
|
const inputNuGetConfigPath: string = path.join(
|
||||||
fakeSourcesDirForTesting,
|
fakeSourcesDirForTesting,
|
||||||
'nuget.config'
|
'nuget.config'
|
||||||
);
|
);
|
||||||
fs.writeFileSync(inputNuGetConfigPath, emptyNuGetConfig);
|
fs.writeFileSync(inputNuGetConfigPath, emptyNuGetConfig);
|
||||||
await auth.configAuthentication(
|
auth.configAuthentication(
|
||||||
'https://nuget.pkg.github.com/OwnerName/index.json',
|
'https://nuget.pkg.github.com/OwnerName/index.json',
|
||||||
'',
|
'',
|
||||||
fakeSourcesDirForTesting
|
fakeSourcesDirForTesting
|
||||||
@ -170,14 +170,14 @@ describe('authutil tests', () => {
|
|||||||
).toMatchSnapshot();
|
).toMatchSnapshot();
|
||||||
});
|
});
|
||||||
|
|
||||||
it('Existing config w/ no GPR sources, sets up a full NuGet.config with URL and user/PAT for GPR', async () => {
|
it('existing config w/ no GPR sources, sets up a full NuGet.config with URL and user/PAT for GPR', async () => {
|
||||||
process.env['NUGET_AUTH_TOKEN'] = 'TEST_FAKE_AUTH_TOKEN';
|
process.env['NUGET_AUTH_TOKEN'] = 'TEST_FAKE_AUTH_TOKEN';
|
||||||
const inputNuGetConfigPath: string = path.join(
|
const inputNuGetConfigPath: string = path.join(
|
||||||
fakeSourcesDirForTesting,
|
fakeSourcesDirForTesting,
|
||||||
'nuget.config'
|
'nuget.config'
|
||||||
);
|
);
|
||||||
fs.writeFileSync(inputNuGetConfigPath, nugetorgNuGetConfig);
|
fs.writeFileSync(inputNuGetConfigPath, nugetorgNuGetConfig);
|
||||||
await auth.configAuthentication(
|
auth.configAuthentication(
|
||||||
'https://nuget.pkg.github.com/OwnerName/index.json',
|
'https://nuget.pkg.github.com/OwnerName/index.json',
|
||||||
'',
|
'',
|
||||||
fakeSourcesDirForTesting
|
fakeSourcesDirForTesting
|
||||||
@ -188,14 +188,14 @@ describe('authutil tests', () => {
|
|||||||
).toMatchSnapshot();
|
).toMatchSnapshot();
|
||||||
});
|
});
|
||||||
|
|
||||||
it('Existing config w/ only GPR source, sets up a partial NuGet.config user/PAT for GPR', async () => {
|
it('existing config w/ only GPR source, sets up a partial NuGet.config user/PAT for GPR', async () => {
|
||||||
process.env['NUGET_AUTH_TOKEN'] = 'TEST_FAKE_AUTH_TOKEN';
|
process.env['NUGET_AUTH_TOKEN'] = 'TEST_FAKE_AUTH_TOKEN';
|
||||||
const inputNuGetConfigPath: string = path.join(
|
const inputNuGetConfigPath: string = path.join(
|
||||||
fakeSourcesDirForTesting,
|
fakeSourcesDirForTesting,
|
||||||
'nuget.config'
|
'nuget.config'
|
||||||
);
|
);
|
||||||
fs.writeFileSync(inputNuGetConfigPath, gprNuGetConfig);
|
fs.writeFileSync(inputNuGetConfigPath, gprNuGetConfig);
|
||||||
await auth.configAuthentication(
|
auth.configAuthentication(
|
||||||
'https://nuget.pkg.github.com/OwnerName/index.json',
|
'https://nuget.pkg.github.com/OwnerName/index.json',
|
||||||
'',
|
'',
|
||||||
fakeSourcesDirForTesting
|
fakeSourcesDirForTesting
|
||||||
@ -206,14 +206,14 @@ describe('authutil tests', () => {
|
|||||||
).toMatchSnapshot();
|
).toMatchSnapshot();
|
||||||
});
|
});
|
||||||
|
|
||||||
it('Existing config w/ GPR source and NuGet.org, sets up a partial NuGet.config user/PAT for GPR', async () => {
|
it('existing config w/ GPR source and NuGet.org, sets up a partial NuGet.config user/PAT for GPR', async () => {
|
||||||
process.env['NUGET_AUTH_TOKEN'] = 'TEST_FAKE_AUTH_TOKEN';
|
process.env['NUGET_AUTH_TOKEN'] = 'TEST_FAKE_AUTH_TOKEN';
|
||||||
const inputNuGetConfigPath: string = path.join(
|
const inputNuGetConfigPath: string = path.join(
|
||||||
fakeSourcesDirForTesting,
|
fakeSourcesDirForTesting,
|
||||||
'nuget.config'
|
'nuget.config'
|
||||||
);
|
);
|
||||||
fs.writeFileSync(inputNuGetConfigPath, gprnugetorgNuGetConfig);
|
fs.writeFileSync(inputNuGetConfigPath, gprnugetorgNuGetConfig);
|
||||||
await auth.configAuthentication(
|
auth.configAuthentication(
|
||||||
'https://nuget.pkg.github.com/OwnerName/index.json',
|
'https://nuget.pkg.github.com/OwnerName/index.json',
|
||||||
'',
|
'',
|
||||||
fakeSourcesDirForTesting
|
fakeSourcesDirForTesting
|
||||||
@ -224,14 +224,14 @@ describe('authutil tests', () => {
|
|||||||
).toMatchSnapshot();
|
).toMatchSnapshot();
|
||||||
});
|
});
|
||||||
|
|
||||||
it('Existing config w/ two GPR sources, sets up a partial NuGet.config user/PAT for GPR', async () => {
|
it('existing config w/ two GPR sources, sets up a partial NuGet.config user/PAT for GPR', async () => {
|
||||||
process.env['NUGET_AUTH_TOKEN'] = 'TEST_FAKE_AUTH_TOKEN';
|
process.env['NUGET_AUTH_TOKEN'] = 'TEST_FAKE_AUTH_TOKEN';
|
||||||
const inputNuGetConfigPath: string = path.join(
|
const inputNuGetConfigPath: string = path.join(
|
||||||
fakeSourcesDirForTesting,
|
fakeSourcesDirForTesting,
|
||||||
'nuget.config'
|
'nuget.config'
|
||||||
);
|
);
|
||||||
fs.writeFileSync(inputNuGetConfigPath, twogprNuGetConfig);
|
fs.writeFileSync(inputNuGetConfigPath, twogprNuGetConfig);
|
||||||
await auth.configAuthentication(
|
auth.configAuthentication(
|
||||||
'https://nuget.pkg.github.com',
|
'https://nuget.pkg.github.com',
|
||||||
'',
|
'',
|
||||||
fakeSourcesDirForTesting
|
fakeSourcesDirForTesting
|
||||||
@ -242,7 +242,7 @@ describe('authutil tests', () => {
|
|||||||
).toMatchSnapshot();
|
).toMatchSnapshot();
|
||||||
});
|
});
|
||||||
|
|
||||||
it('Existing config w/ spaces in key, throws for now', async () => {
|
it('existing config w/ spaces in key, throws for now', async () => {
|
||||||
process.env['NUGET_AUTH_TOKEN'] = 'TEST_FAKE_AUTH_TOKEN';
|
process.env['NUGET_AUTH_TOKEN'] = 'TEST_FAKE_AUTH_TOKEN';
|
||||||
const inputNuGetConfigPath: string = path.join(
|
const inputNuGetConfigPath: string = path.join(
|
||||||
fakeSourcesDirForTesting,
|
fakeSourcesDirForTesting,
|
||||||
@ -251,7 +251,7 @@ describe('authutil tests', () => {
|
|||||||
fs.writeFileSync(inputNuGetConfigPath, spaceNuGetConfig);
|
fs.writeFileSync(inputNuGetConfigPath, spaceNuGetConfig);
|
||||||
let thrown = false;
|
let thrown = false;
|
||||||
try {
|
try {
|
||||||
await auth.configAuthentication(
|
auth.configAuthentication(
|
||||||
'https://nuget.pkg.github.com/OwnerName/index.json',
|
'https://nuget.pkg.github.com/OwnerName/index.json',
|
||||||
'',
|
'',
|
||||||
fakeSourcesDirForTesting
|
fakeSourcesDirForTesting
|
||||||
@ -262,7 +262,7 @@ describe('authutil tests', () => {
|
|||||||
expect(thrown).toBe(true);
|
expect(thrown).toBe(true);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('Existing config not in repo root, sets up a partial NuGet.config user/PAT for GPR', async () => {
|
it('existing config not in repo root, sets up a partial NuGet.config user/PAT for GPR', async () => {
|
||||||
process.env['NUGET_AUTH_TOKEN'] = 'TEST_FAKE_AUTH_TOKEN';
|
process.env['NUGET_AUTH_TOKEN'] = 'TEST_FAKE_AUTH_TOKEN';
|
||||||
const inputNuGetConfigDirectory: string = path.join(
|
const inputNuGetConfigDirectory: string = path.join(
|
||||||
fakeSourcesDirForTesting,
|
fakeSourcesDirForTesting,
|
||||||
@ -274,7 +274,7 @@ describe('authutil tests', () => {
|
|||||||
);
|
);
|
||||||
fs.mkdirSync(inputNuGetConfigDirectory, {recursive: true});
|
fs.mkdirSync(inputNuGetConfigDirectory, {recursive: true});
|
||||||
fs.writeFileSync(inputNuGetConfigPath, gprNuGetConfig);
|
fs.writeFileSync(inputNuGetConfigPath, gprNuGetConfig);
|
||||||
await auth.configAuthentication(
|
auth.configAuthentication(
|
||||||
'https://nuget.pkg.github.com/OwnerName/index.json',
|
'https://nuget.pkg.github.com/OwnerName/index.json',
|
||||||
'subfolder/nuget.config',
|
'subfolder/nuget.config',
|
||||||
fakeSourcesDirForTesting
|
fakeSourcesDirForTesting
|
||||||
@ -285,14 +285,14 @@ describe('authutil tests', () => {
|
|||||||
).toMatchSnapshot();
|
).toMatchSnapshot();
|
||||||
});
|
});
|
||||||
|
|
||||||
it('Existing config w/ only Azure Artifacts source, sets up a partial NuGet.config user/PAT for GPR', async () => {
|
it('existing config w/ only Azure Artifacts source, sets up a partial NuGet.config user/PAT for GPR', async () => {
|
||||||
process.env['NUGET_AUTH_TOKEN'] = 'TEST_FAKE_AUTH_TOKEN';
|
process.env['NUGET_AUTH_TOKEN'] = 'TEST_FAKE_AUTH_TOKEN';
|
||||||
const inputNuGetConfigPath: string = path.join(
|
const inputNuGetConfigPath: string = path.join(
|
||||||
fakeSourcesDirForTesting,
|
fakeSourcesDirForTesting,
|
||||||
'nuget.config'
|
'nuget.config'
|
||||||
);
|
);
|
||||||
fs.writeFileSync(inputNuGetConfigPath, azureartifactsNuGetConfig);
|
fs.writeFileSync(inputNuGetConfigPath, azureartifactsNuGetConfig);
|
||||||
await auth.configAuthentication(
|
auth.configAuthentication(
|
||||||
'https://pkgs.dev.azure.com/amullans/_packaging/GitHubBuilds/nuget/v3/index.json',
|
'https://pkgs.dev.azure.com/amullans/_packaging/GitHubBuilds/nuget/v3/index.json',
|
||||||
'',
|
'',
|
||||||
fakeSourcesDirForTesting
|
fakeSourcesDirForTesting
|
||||||
@ -303,14 +303,14 @@ describe('authutil tests', () => {
|
|||||||
).toMatchSnapshot();
|
).toMatchSnapshot();
|
||||||
});
|
});
|
||||||
|
|
||||||
it('Existing config w/ Azure Artifacts source and NuGet.org, sets up a partial NuGet.config user/PAT for GPR', async () => {
|
it('existing config w/ Azure Artifacts source and NuGet.org, sets up a partial NuGet.config user/PAT for GPR', async () => {
|
||||||
process.env['NUGET_AUTH_TOKEN'] = 'TEST_FAKE_AUTH_TOKEN';
|
process.env['NUGET_AUTH_TOKEN'] = 'TEST_FAKE_AUTH_TOKEN';
|
||||||
const inputNuGetConfigPath: string = path.join(
|
const inputNuGetConfigPath: string = path.join(
|
||||||
fakeSourcesDirForTesting,
|
fakeSourcesDirForTesting,
|
||||||
'nuget.config'
|
'nuget.config'
|
||||||
);
|
);
|
||||||
fs.writeFileSync(inputNuGetConfigPath, azureartifactsnugetorgNuGetConfig);
|
fs.writeFileSync(inputNuGetConfigPath, azureartifactsnugetorgNuGetConfig);
|
||||||
await auth.configAuthentication(
|
auth.configAuthentication(
|
||||||
'https://pkgs.dev.azure.com/amullans/_packaging/GitHubBuilds/nuget/v3/index.json',
|
'https://pkgs.dev.azure.com/amullans/_packaging/GitHubBuilds/nuget/v3/index.json',
|
||||||
'',
|
'',
|
||||||
fakeSourcesDirForTesting
|
fakeSourcesDirForTesting
|
||||||
@ -321,9 +321,9 @@ describe('authutil tests', () => {
|
|||||||
).toMatchSnapshot();
|
).toMatchSnapshot();
|
||||||
});
|
});
|
||||||
|
|
||||||
it('No existing config, sets up a full NuGet.config with URL and token for other source', async () => {
|
it('no existing config, sets up a full NuGet.config with URL and token for other source', async () => {
|
||||||
process.env['NUGET_AUTH_TOKEN'] = 'TEST_FAKE_AUTH_TOKEN';
|
process.env['NUGET_AUTH_TOKEN'] = 'TEST_FAKE_AUTH_TOKEN';
|
||||||
await auth.configAuthentication(
|
auth.configAuthentication(
|
||||||
'https://pkgs.dev.azure.com/amullans/_packaging/GitHubBuilds/nuget/v3/index.json',
|
'https://pkgs.dev.azure.com/amullans/_packaging/GitHubBuilds/nuget/v3/index.json',
|
||||||
'',
|
'',
|
||||||
fakeSourcesDirForTesting
|
fakeSourcesDirForTesting
|
||||||
|
@ -1,21 +1,45 @@
|
|||||||
|
import cscFile from '../.github/csc.json';
|
||||||
describe('csc tests', () => {
|
describe('csc tests', () => {
|
||||||
it('Valid regular expression', async () => {
|
test('regular expression in csc.json is valid', async () => {
|
||||||
var cscFile = require('../.github/csc.json');
|
const regexPattern = cscFile['problemMatcher'][0]['pattern'][0]['regexp'];
|
||||||
var regex = cscFile['problemMatcher'][0]['pattern'][0]['regexp'];
|
const regexResultsMap = cscFile['problemMatcher'][0]['pattern'][0];
|
||||||
|
|
||||||
console.log(regex);
|
const regex = new RegExp(regexPattern);
|
||||||
var re = new RegExp(regex);
|
|
||||||
|
|
||||||
// Ideally we would verify that this
|
const stringsToMatch = [
|
||||||
var stringsToMatch = [
|
|
||||||
'Program.cs(10,79): error CS1002: ; expected [/Users/zacharyeisinger/Documents/repo/setup-dotnet/__tests__/sample-broken-csproj/sample.csproj]',
|
'Program.cs(10,79): error CS1002: ; expected [/Users/zacharyeisinger/Documents/repo/setup-dotnet/__tests__/sample-broken-csproj/sample.csproj]',
|
||||||
"S:\\Msbuild\\src\\Build\\Evaluation\\ExpressionShredder.cs(33,7): error CS1003: Syntax error, ',' expected [S:\\msbuild\\src\\Build\\Microsoft.Build.csproj > Properties:prop]"
|
"S:\\Msbuild\\src\\Build\\Evaluation\\ExpressionShredder.cs(33,7): error CS1003: Syntax error, ',' expected [S:\\msbuild\\src\\Build\\Microsoft.Build.csproj > Properties:prop]"
|
||||||
];
|
];
|
||||||
|
// Expected results are calculated according to the csc matcher located in csc.json file
|
||||||
|
const expectedResults = [
|
||||||
|
{
|
||||||
|
file: 'Program.cs',
|
||||||
|
line: '10',
|
||||||
|
severity: 'error',
|
||||||
|
code: 'CS1002',
|
||||||
|
message: '; expected',
|
||||||
|
fromPath:
|
||||||
|
'/Users/zacharyeisinger/Documents/repo/setup-dotnet/__tests__/sample-broken-csproj/sample.csproj'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
file: 'S:\\Msbuild\\src\\Build\\Evaluation\\ExpressionShredder.cs',
|
||||||
|
line: '33',
|
||||||
|
severity: 'error',
|
||||||
|
code: 'CS1003',
|
||||||
|
message: "Syntax error, ',' expected",
|
||||||
|
fromPath:
|
||||||
|
'S:\\msbuild\\src\\Build\\Microsoft.Build.csproj > Properties:prop'
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
stringsToMatch.forEach(string => {
|
stringsToMatch.map((string, index) => {
|
||||||
var matchStr = string.match(re);
|
const matchedResultsArray = string.match(regex);
|
||||||
console.log(matchStr);
|
for (const propName in expectedResults[index]) {
|
||||||
expect(matchStr).toEqual(expect.anything());
|
const propertyIndex = regexResultsMap[propName];
|
||||||
|
const expectedPropValue = expectedResults[index][propName];
|
||||||
|
const matchedPropValue = matchedResultsArray![propertyIndex];
|
||||||
|
expect(matchedPropValue).toEqual(expectedPropValue);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}, 10000);
|
}, 10000);
|
||||||
});
|
});
|
||||||
|
18
__tests__/e2e-test-csproj/Test.cs
Normal file
18
__tests__/e2e-test-csproj/Test.cs
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||||
|
using System;
|
||||||
|
|
||||||
|
namespace test_csproj
|
||||||
|
{
|
||||||
|
[TestClass]
|
||||||
|
public class Test
|
||||||
|
{
|
||||||
|
[TestMethod]
|
||||||
|
public void TestMethod()
|
||||||
|
{
|
||||||
|
Console.WriteLine("TestMethod");
|
||||||
|
int calculatedResult = 1000 / 25;
|
||||||
|
int expectedResult = 40;
|
||||||
|
Assert.AreEqual(calculatedResult, expectedResult);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
15
__tests__/e2e-test-csproj/test.csproj
Normal file
15
__tests__/e2e-test-csproj/test.csproj
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
|
<PropertyGroup>
|
||||||
|
<TargetFramework>$(TEST_TARGET_FRAMEWORK)</TargetFramework>
|
||||||
|
<IsPackable>false</IsPackable>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<!-- These packages will be downloaded over the network for testing proxy settings -->
|
||||||
|
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.5.0-preview-20170810-02" />
|
||||||
|
<PackageReference Include="MSTest.TestAdapter" Version="1.1.18" />
|
||||||
|
<PackageReference Include="MSTest.TestFramework" Version="1.1.18" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
</Project>
|
65
__tests__/installation-scripts.test.ts
Normal file
65
__tests__/installation-scripts.test.ts
Normal file
@ -0,0 +1,65 @@
|
|||||||
|
import path from 'path';
|
||||||
|
import fs from 'fs';
|
||||||
|
import * as hc from '@actions/http-client';
|
||||||
|
|
||||||
|
const HTTP_CLIENT_OPTIONS = {allowRetries: true, maxRetries: 10} as const;
|
||||||
|
const TEST_TIMEOUT = 30000;
|
||||||
|
|
||||||
|
describe('Dotnet installation scripts tests', () => {
|
||||||
|
it(
|
||||||
|
'Uses an up to date bash download script',
|
||||||
|
async () => {
|
||||||
|
const httpCallbackClient = new hc.HttpClient(
|
||||||
|
'setup-dotnet-test',
|
||||||
|
[],
|
||||||
|
HTTP_CLIENT_OPTIONS
|
||||||
|
);
|
||||||
|
const response: hc.HttpClientResponse = await httpCallbackClient.get(
|
||||||
|
'https://dot.net/v1/dotnet-install.sh'
|
||||||
|
);
|
||||||
|
expect(response.message.statusCode).toBe(200);
|
||||||
|
const upToDateContents: string = await response.readBody();
|
||||||
|
const currentContents: string = fs
|
||||||
|
.readFileSync(
|
||||||
|
path.join(__dirname, '..', 'externals', 'install-dotnet.sh')
|
||||||
|
)
|
||||||
|
.toString();
|
||||||
|
expect(normalizeFileContents(currentContents)).toBe(
|
||||||
|
normalizeFileContents(upToDateContents)
|
||||||
|
);
|
||||||
|
},
|
||||||
|
TEST_TIMEOUT
|
||||||
|
);
|
||||||
|
|
||||||
|
it(
|
||||||
|
'Uses an up to date powershell download script',
|
||||||
|
async () => {
|
||||||
|
const httpCallbackClient = new hc.HttpClient(
|
||||||
|
'setup-dotnet-test',
|
||||||
|
[],
|
||||||
|
HTTP_CLIENT_OPTIONS
|
||||||
|
);
|
||||||
|
const response: hc.HttpClientResponse = await httpCallbackClient.get(
|
||||||
|
'https://dot.net/v1/dotnet-install.ps1'
|
||||||
|
);
|
||||||
|
expect(response.message.statusCode).toBe(200);
|
||||||
|
const upToDateContents: string = await response.readBody();
|
||||||
|
const currentContents: string = fs
|
||||||
|
.readFileSync(
|
||||||
|
path.join(__dirname, '..', 'externals', 'install-dotnet.ps1')
|
||||||
|
)
|
||||||
|
.toString();
|
||||||
|
expect(normalizeFileContents(currentContents)).toBe(
|
||||||
|
normalizeFileContents(upToDateContents)
|
||||||
|
);
|
||||||
|
},
|
||||||
|
TEST_TIMEOUT
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
|
function normalizeFileContents(contents: string): string {
|
||||||
|
return contents
|
||||||
|
.trim()
|
||||||
|
.replace(new RegExp('\r\n', 'g'), '\n')
|
||||||
|
.replace(new RegExp('\r', 'g'), '\n');
|
||||||
|
}
|
@ -1,169 +1,304 @@
|
|||||||
import * as io from '@actions/io';
|
|
||||||
import * as os from 'os';
|
|
||||||
import fs from 'fs';
|
|
||||||
import path from 'path';
|
|
||||||
import each from 'jest-each';
|
import each from 'jest-each';
|
||||||
import * as hc from '@actions/http-client';
|
import semver from 'semver';
|
||||||
|
import * as exec from '@actions/exec';
|
||||||
|
import * as core from '@actions/core';
|
||||||
|
import * as io from '@actions/io';
|
||||||
import * as installer from '../src/installer';
|
import * as installer from '../src/installer';
|
||||||
import {QualityOptions} from '../src/setup-dotnet';
|
|
||||||
|
|
||||||
import {IS_WINDOWS} from '../src/utils';
|
import {IS_WINDOWS} from '../src/utils';
|
||||||
import {IS_LINUX} from '../src/utils';
|
import {QualityOptions} from '../src/setup-dotnet';
|
||||||
|
|
||||||
let toolDir: string;
|
describe('installer tests', () => {
|
||||||
|
const env = process.env;
|
||||||
|
|
||||||
if (IS_WINDOWS) {
|
beforeEach(() => {
|
||||||
toolDir = path.join(process.env['PROGRAMFILES'] + '', 'dotnet');
|
jest.resetModules();
|
||||||
} else if (IS_LINUX) {
|
process.env = {...env};
|
||||||
toolDir = '/usr/share/dotnet';
|
|
||||||
} else {
|
|
||||||
toolDir = path.join(process.env['HOME'] + '', '.dotnet');
|
|
||||||
}
|
|
||||||
const tempDir = path.join(__dirname, 'runner', 'temp');
|
|
||||||
|
|
||||||
process.env['RUNNER_TOOL_CACHE'] = toolDir;
|
|
||||||
process.env['RUNNER_TEMP'] = tempDir;
|
|
||||||
|
|
||||||
describe('DotnetCoreInstaller tests', () => {
|
|
||||||
beforeAll(async () => {
|
|
||||||
process.env.RUNNER_TOOL_CACHE = toolDir;
|
|
||||||
process.env.DOTNET_INSTALL_DIR = toolDir;
|
|
||||||
process.env.RUNNER_TEMP = tempDir;
|
|
||||||
process.env.DOTNET_ROOT = '';
|
|
||||||
try {
|
|
||||||
await io.rmRF(`${toolDir}/*`);
|
|
||||||
await io.rmRF(`${tempDir}/*`);
|
|
||||||
} catch (err) {
|
|
||||||
console.log(
|
|
||||||
`Failed to remove test directories, check the error message:${os.EOL}`,
|
|
||||||
err.message
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}, 30000);
|
|
||||||
|
|
||||||
afterEach(async () => {
|
|
||||||
try {
|
|
||||||
await io.rmRF(`${toolDir}/*`);
|
|
||||||
await io.rmRF(`${tempDir}/*`);
|
|
||||||
} catch (err) {
|
|
||||||
console.log(
|
|
||||||
`Failed to remove test directories, check the error message:${os.EOL}`,
|
|
||||||
err.message
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}, 30000);
|
|
||||||
|
|
||||||
it('Aquires multiple versions of dotnet', async () => {
|
|
||||||
const versions = ['2.2.207', '3.1.120'];
|
|
||||||
|
|
||||||
for (const version of versions) {
|
|
||||||
await getDotnet(version);
|
|
||||||
}
|
|
||||||
expect(fs.existsSync(path.join(toolDir, 'sdk', '2.2.207'))).toBe(true);
|
|
||||||
expect(fs.existsSync(path.join(toolDir, 'sdk', '3.1.120'))).toBe(true);
|
|
||||||
|
|
||||||
if (IS_WINDOWS) {
|
|
||||||
expect(fs.existsSync(path.join(toolDir, 'dotnet.exe'))).toBe(true);
|
|
||||||
} else {
|
|
||||||
expect(fs.existsSync(path.join(toolDir, 'dotnet'))).toBe(true);
|
|
||||||
}
|
|
||||||
|
|
||||||
expect(process.env.DOTNET_ROOT).toBeDefined;
|
|
||||||
expect(process.env.PATH).toBeDefined;
|
|
||||||
expect(process.env.DOTNET_ROOT).toBe(toolDir);
|
|
||||||
expect(process.env.PATH?.startsWith(toolDir)).toBe(true);
|
|
||||||
}, 600000);
|
|
||||||
|
|
||||||
it('Acquires version of dotnet if no matching version is installed', async () => {
|
|
||||||
await getDotnet('3.1.201');
|
|
||||||
expect(fs.existsSync(path.join(toolDir, 'sdk', '3.1.201'))).toBe(true);
|
|
||||||
if (IS_WINDOWS) {
|
|
||||||
expect(fs.existsSync(path.join(toolDir, 'dotnet.exe'))).toBe(true);
|
|
||||||
} else {
|
|
||||||
expect(fs.existsSync(path.join(toolDir, 'dotnet'))).toBe(true);
|
|
||||||
}
|
|
||||||
|
|
||||||
expect(process.env.DOTNET_ROOT).toBeDefined;
|
|
||||||
expect(process.env.PATH).toBeDefined;
|
|
||||||
expect(process.env.DOTNET_ROOT).toBe(toolDir);
|
|
||||||
expect(process.env.PATH?.startsWith(toolDir)).toBe(true);
|
|
||||||
}, 600000); //This needs some time to download on "slower" internet connections
|
|
||||||
|
|
||||||
it('Acquires generic version of dotnet if no matching version is installed', async () => {
|
|
||||||
await getDotnet('3.1');
|
|
||||||
var directory = fs
|
|
||||||
.readdirSync(path.join(toolDir, 'sdk'))
|
|
||||||
.filter(fn => fn.startsWith('3.1.'));
|
|
||||||
expect(directory.length > 0).toBe(true);
|
|
||||||
if (IS_WINDOWS) {
|
|
||||||
expect(fs.existsSync(path.join(toolDir, 'dotnet.exe'))).toBe(true);
|
|
||||||
} else {
|
|
||||||
expect(fs.existsSync(path.join(toolDir, 'dotnet'))).toBe(true);
|
|
||||||
}
|
|
||||||
|
|
||||||
expect(process.env.DOTNET_ROOT).toBeDefined;
|
|
||||||
expect(process.env.PATH).toBeDefined;
|
|
||||||
expect(process.env.DOTNET_ROOT).toBe(toolDir);
|
|
||||||
expect(process.env.PATH?.startsWith(toolDir)).toBe(true);
|
|
||||||
}, 600000); //This needs some time to download on "slower" internet connections
|
|
||||||
|
|
||||||
it('Returns string with installed SDK version', async () => {
|
|
||||||
const version = '3.1.120';
|
|
||||||
let installedVersion: string;
|
|
||||||
|
|
||||||
installedVersion = await getDotnet(version);
|
|
||||||
|
|
||||||
expect(installedVersion).toBe('3.1.120');
|
|
||||||
}, 600000);
|
|
||||||
|
|
||||||
it('Throws if no location contains correct dotnet version', async () => {
|
|
||||||
await expect(async () => {
|
|
||||||
await getDotnet('1000.0.0');
|
|
||||||
}).rejects.toThrow();
|
|
||||||
}, 30000);
|
|
||||||
|
|
||||||
it('Uses an up to date bash download script', async () => {
|
|
||||||
const httpCallbackClient = new hc.HttpClient('setup-dotnet-test', [], {
|
|
||||||
allowRetries: true,
|
|
||||||
maxRetries: 3
|
|
||||||
});
|
});
|
||||||
const response: hc.HttpClientResponse = await httpCallbackClient.get(
|
|
||||||
'https://dot.net/v1/dotnet-install.sh'
|
|
||||||
);
|
|
||||||
expect(response.message.statusCode).toBe(200);
|
|
||||||
const upToDateContents: string = await response.readBody();
|
|
||||||
const currentContents: string = fs
|
|
||||||
.readFileSync(
|
|
||||||
path.join(__dirname, '..', 'externals', 'install-dotnet.sh')
|
|
||||||
)
|
|
||||||
.toString();
|
|
||||||
expect(normalizeFileContents(currentContents)).toBe(
|
|
||||||
normalizeFileContents(upToDateContents)
|
|
||||||
);
|
|
||||||
}, 30000);
|
|
||||||
|
|
||||||
it('Uses an up to date powershell download script', async () => {
|
describe('DotnetCoreInstaller tests', () => {
|
||||||
var httpCallbackClient = new hc.HttpClient('setup-dotnet-test', [], {
|
const getExecOutputSpy = jest.spyOn(exec, 'getExecOutput');
|
||||||
allowRetries: true,
|
const warningSpy = jest.spyOn(core, 'warning');
|
||||||
maxRetries: 3
|
const whichSpy = jest.spyOn(io, 'which');
|
||||||
|
const maxSatisfyingSpy = jest.spyOn(semver, 'maxSatisfying');
|
||||||
|
|
||||||
|
describe('installDotnet() tests', () => {
|
||||||
|
whichSpy.mockImplementation(() => Promise.resolve('PathToShell'));
|
||||||
|
|
||||||
|
it('should throw the error in case of non-zero exit code of the installation script. The error message should contain logs.', async () => {
|
||||||
|
const inputVersion = '3.1.100';
|
||||||
|
const inputQuality = '' as QualityOptions;
|
||||||
|
const errorMessage = 'fictitious error message!';
|
||||||
|
getExecOutputSpy.mockImplementation(() => {
|
||||||
|
return Promise.resolve({
|
||||||
|
exitCode: 1,
|
||||||
|
stdout: '',
|
||||||
|
stderr: errorMessage
|
||||||
});
|
});
|
||||||
const response: hc.HttpClientResponse = await httpCallbackClient.get(
|
});
|
||||||
'https://dot.net/v1/dotnet-install.ps1'
|
const dotnetInstaller = new installer.DotnetCoreInstaller(
|
||||||
|
inputVersion,
|
||||||
|
inputQuality
|
||||||
);
|
);
|
||||||
expect(response.message.statusCode).toBe(200);
|
await expect(dotnetInstaller.installDotnet()).rejects.toThrow(
|
||||||
const upToDateContents: string = await response.readBody();
|
`Failed to install dotnet, exit code: 1. ${errorMessage}`
|
||||||
const currentContents: string = fs
|
|
||||||
.readFileSync(
|
|
||||||
path.join(__dirname, '..', 'externals', 'install-dotnet.ps1')
|
|
||||||
)
|
|
||||||
.toString();
|
|
||||||
expect(normalizeFileContents(currentContents)).toBe(
|
|
||||||
normalizeFileContents(upToDateContents)
|
|
||||||
);
|
);
|
||||||
}, 30000);
|
});
|
||||||
});
|
|
||||||
|
|
||||||
describe('DotnetVersionResolver tests', () => {
|
it('should return version of .NET SDK after installation complete', async () => {
|
||||||
|
const inputVersion = '3.1.100';
|
||||||
|
const inputQuality = '' as QualityOptions;
|
||||||
|
const stdout = `Fictitious dotnet version ${inputVersion} is installed`;
|
||||||
|
getExecOutputSpy.mockImplementation(() => {
|
||||||
|
return Promise.resolve({
|
||||||
|
exitCode: 0,
|
||||||
|
stdout: `${stdout}`,
|
||||||
|
stderr: ''
|
||||||
|
});
|
||||||
|
});
|
||||||
|
maxSatisfyingSpy.mockImplementation(() => inputVersion);
|
||||||
|
|
||||||
|
const dotnetInstaller = new installer.DotnetCoreInstaller(
|
||||||
|
inputVersion,
|
||||||
|
inputQuality
|
||||||
|
);
|
||||||
|
const installedVersion = await dotnetInstaller.installDotnet();
|
||||||
|
|
||||||
|
expect(installedVersion).toBe(inputVersion);
|
||||||
|
});
|
||||||
|
|
||||||
|
it(`should supply 'version' argument to the installation script if supplied version is in A.B.C syntax`, async () => {
|
||||||
|
const inputVersion = '6.0.300';
|
||||||
|
const inputQuality = '' as QualityOptions;
|
||||||
|
const stdout = `Fictitious dotnet version ${inputVersion} is installed`;
|
||||||
|
|
||||||
|
getExecOutputSpy.mockImplementation(() => {
|
||||||
|
return Promise.resolve({
|
||||||
|
exitCode: 0,
|
||||||
|
stdout: `${stdout}`,
|
||||||
|
stderr: ''
|
||||||
|
});
|
||||||
|
});
|
||||||
|
maxSatisfyingSpy.mockImplementation(() => inputVersion);
|
||||||
|
|
||||||
|
const dotnetInstaller = new installer.DotnetCoreInstaller(
|
||||||
|
inputVersion,
|
||||||
|
inputQuality
|
||||||
|
);
|
||||||
|
|
||||||
|
await dotnetInstaller.installDotnet();
|
||||||
|
|
||||||
|
const scriptArguments = (
|
||||||
|
getExecOutputSpy.mock.calls[0][1] as string[]
|
||||||
|
).join(' ');
|
||||||
|
const expectedArgument = IS_WINDOWS
|
||||||
|
? `-Version ${inputVersion}`
|
||||||
|
: `--version ${inputVersion}`;
|
||||||
|
|
||||||
|
expect(scriptArguments).toContain(expectedArgument);
|
||||||
|
});
|
||||||
|
|
||||||
|
it(`should warn if the 'quality' input is set and the supplied version is in A.B.C syntax`, async () => {
|
||||||
|
const inputVersion = '6.0.300';
|
||||||
|
const inputQuality = 'ga' as QualityOptions;
|
||||||
|
const stdout = `Fictitious dotnet version ${inputVersion} is installed`;
|
||||||
|
getExecOutputSpy.mockImplementation(() => {
|
||||||
|
return Promise.resolve({
|
||||||
|
exitCode: 0,
|
||||||
|
stdout: `${stdout}`,
|
||||||
|
stderr: ''
|
||||||
|
});
|
||||||
|
});
|
||||||
|
maxSatisfyingSpy.mockImplementation(() => inputVersion);
|
||||||
|
|
||||||
|
const dotnetInstaller = new installer.DotnetCoreInstaller(
|
||||||
|
inputVersion,
|
||||||
|
inputQuality
|
||||||
|
);
|
||||||
|
|
||||||
|
await dotnetInstaller.installDotnet();
|
||||||
|
|
||||||
|
expect(warningSpy).toHaveBeenCalledWith(
|
||||||
|
`The 'dotnet-quality' input can be used only with .NET SDK version in A.B, A.B.x, A, A.x and A.B.Cxx formats where the major tag is higher than 5. You specified: ${inputVersion}. 'dotnet-quality' input is ignored.`
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
|
it(`should warn if the 'quality' input is set and version isn't in A.B.C syntax but major tag is lower then 6`, async () => {
|
||||||
|
const inputVersion = '3.1';
|
||||||
|
const inputQuality = 'ga' as QualityOptions;
|
||||||
|
const stdout = `Fictitious dotnet version 3.1.100 is installed`;
|
||||||
|
|
||||||
|
getExecOutputSpy.mockImplementation(() => {
|
||||||
|
return Promise.resolve({
|
||||||
|
exitCode: 0,
|
||||||
|
stdout: `${stdout}`,
|
||||||
|
stderr: ''
|
||||||
|
});
|
||||||
|
});
|
||||||
|
maxSatisfyingSpy.mockImplementation(() => inputVersion);
|
||||||
|
|
||||||
|
const dotnetInstaller = new installer.DotnetCoreInstaller(
|
||||||
|
inputVersion,
|
||||||
|
inputQuality
|
||||||
|
);
|
||||||
|
|
||||||
|
await dotnetInstaller.installDotnet();
|
||||||
|
|
||||||
|
expect(warningSpy).toHaveBeenCalledWith(
|
||||||
|
`The 'dotnet-quality' input can be used only with .NET SDK version in A.B, A.B.x, A, A.x and A.B.Cxx formats where the major tag is higher than 5. You specified: ${inputVersion}. 'dotnet-quality' input is ignored.`
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
|
each(['6', '6.0', '6.0.x', '6.0.*', '6.0.X']).test(
|
||||||
|
`should supply 'quality' argument to the installation script if quality input is set and version (%s) is not in A.B.C syntax`,
|
||||||
|
async inputVersion => {
|
||||||
|
const inputQuality = 'ga' as QualityOptions;
|
||||||
|
const exitCode = 0;
|
||||||
|
const stdout = `Fictitious dotnet version 6.0.0 is installed`;
|
||||||
|
getExecOutputSpy.mockImplementation(() => {
|
||||||
|
return Promise.resolve({
|
||||||
|
exitCode: exitCode,
|
||||||
|
stdout: `${stdout}`,
|
||||||
|
stderr: ''
|
||||||
|
});
|
||||||
|
});
|
||||||
|
maxSatisfyingSpy.mockImplementation(() => inputVersion);
|
||||||
|
|
||||||
|
const dotnetInstaller = new installer.DotnetCoreInstaller(
|
||||||
|
inputVersion,
|
||||||
|
inputQuality
|
||||||
|
);
|
||||||
|
|
||||||
|
await dotnetInstaller.installDotnet();
|
||||||
|
|
||||||
|
const scriptArguments = (
|
||||||
|
getExecOutputSpy.mock.calls[0][1] as string[]
|
||||||
|
).join(' ');
|
||||||
|
const expectedArgument = IS_WINDOWS
|
||||||
|
? `-Quality ${inputQuality}`
|
||||||
|
: `--quality ${inputQuality}`;
|
||||||
|
|
||||||
|
expect(scriptArguments).toContain(expectedArgument);
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
each(['6', '6.0', '6.0.x', '6.0.*', '6.0.X']).test(
|
||||||
|
`should supply 'channel' argument to the installation script if version (%s) isn't in A.B.C syntax`,
|
||||||
|
async inputVersion => {
|
||||||
|
const inputQuality = '' as QualityOptions;
|
||||||
|
const exitCode = 0;
|
||||||
|
const stdout = `Fictitious dotnet version 6.0.0 is installed`;
|
||||||
|
getExecOutputSpy.mockImplementation(() => {
|
||||||
|
return Promise.resolve({
|
||||||
|
exitCode: exitCode,
|
||||||
|
stdout: `${stdout}`,
|
||||||
|
stderr: ''
|
||||||
|
});
|
||||||
|
});
|
||||||
|
maxSatisfyingSpy.mockImplementation(() => inputVersion);
|
||||||
|
|
||||||
|
const dotnetInstaller = new installer.DotnetCoreInstaller(
|
||||||
|
inputVersion,
|
||||||
|
inputQuality
|
||||||
|
);
|
||||||
|
|
||||||
|
await dotnetInstaller.installDotnet();
|
||||||
|
|
||||||
|
const scriptArguments = (
|
||||||
|
getExecOutputSpy.mock.calls[0][1] as string[]
|
||||||
|
).join(' ');
|
||||||
|
const expectedArgument = IS_WINDOWS
|
||||||
|
? `-Channel 6.0`
|
||||||
|
: `--channel 6.0`;
|
||||||
|
|
||||||
|
expect(scriptArguments).toContain(expectedArgument);
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
if (IS_WINDOWS) {
|
||||||
|
it(`should supply '-ProxyAddress' argument to the installation script if env.variable 'https_proxy' is set`, async () => {
|
||||||
|
process.env['https_proxy'] = 'https://proxy.com';
|
||||||
|
const inputVersion = '6.0.100';
|
||||||
|
const inputQuality = '' as QualityOptions;
|
||||||
|
const stdout = `Fictitious dotnet version ${inputVersion} is installed`;
|
||||||
|
|
||||||
|
getExecOutputSpy.mockImplementation(() => {
|
||||||
|
return Promise.resolve({
|
||||||
|
exitCode: 0,
|
||||||
|
stdout: `${stdout}`,
|
||||||
|
stderr: ''
|
||||||
|
});
|
||||||
|
});
|
||||||
|
maxSatisfyingSpy.mockImplementation(() => inputVersion);
|
||||||
|
|
||||||
|
const dotnetInstaller = new installer.DotnetCoreInstaller(
|
||||||
|
inputVersion,
|
||||||
|
inputQuality
|
||||||
|
);
|
||||||
|
|
||||||
|
await dotnetInstaller.installDotnet();
|
||||||
|
|
||||||
|
const scriptArguments = (
|
||||||
|
getExecOutputSpy.mock.calls[0][1] as string[]
|
||||||
|
).join(' ');
|
||||||
|
|
||||||
|
expect(scriptArguments).toContain(
|
||||||
|
`-ProxyAddress ${process.env['https_proxy']}`
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
|
it(`should supply '-ProxyBypassList' argument to the installation script if env.variable 'no_proxy' is set`, async () => {
|
||||||
|
process.env['no_proxy'] = 'first.url,second.url';
|
||||||
|
const inputVersion = '6.0.100';
|
||||||
|
const inputQuality = '' as QualityOptions;
|
||||||
|
const stdout = `Fictitious dotnet version 6.0.0 is installed`;
|
||||||
|
|
||||||
|
getExecOutputSpy.mockImplementation(() => {
|
||||||
|
return Promise.resolve({
|
||||||
|
exitCode: 0,
|
||||||
|
stdout: `${stdout}`,
|
||||||
|
stderr: ''
|
||||||
|
});
|
||||||
|
});
|
||||||
|
maxSatisfyingSpy.mockImplementation(() => inputVersion);
|
||||||
|
|
||||||
|
const dotnetInstaller = new installer.DotnetCoreInstaller(
|
||||||
|
inputVersion,
|
||||||
|
inputQuality
|
||||||
|
);
|
||||||
|
|
||||||
|
await dotnetInstaller.installDotnet();
|
||||||
|
|
||||||
|
const scriptArguments = (
|
||||||
|
getExecOutputSpy.mock.calls[0][1] as string[]
|
||||||
|
).join(' ');
|
||||||
|
|
||||||
|
expect(scriptArguments).toContain(
|
||||||
|
`-ProxyBypassList ${process.env['no_proxy']}`
|
||||||
|
);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
describe('addToPath() tests', () => {
|
||||||
|
it(`should export DOTNET_ROOT env.var with value from DOTNET_INSTALL_DIR env.var`, async () => {
|
||||||
|
process.env['DOTNET_INSTALL_DIR'] = 'fictitious/dotnet/install/dir';
|
||||||
|
installer.DotnetCoreInstaller.addToPath();
|
||||||
|
const dotnet_root = process.env['DOTNET_ROOT'];
|
||||||
|
expect(dotnet_root).toBe(process.env['DOTNET_INSTALL_DIR']);
|
||||||
|
});
|
||||||
|
|
||||||
|
it(`should export value from DOTNET_INSTALL_DIR env.var to the PATH`, async () => {
|
||||||
|
process.env['DOTNET_INSTALL_DIR'] = 'fictitious/dotnet/install/dir';
|
||||||
|
installer.DotnetCoreInstaller.addToPath();
|
||||||
|
const path = process.env['PATH'];
|
||||||
|
expect(path).toContain(process.env['DOTNET_INSTALL_DIR']);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
describe('DotnetVersionResolver tests', () => {
|
||||||
|
describe('createDotNetVersion() tests', () => {
|
||||||
each([
|
each([
|
||||||
'3.1',
|
'3.1',
|
||||||
'3.x',
|
'3.x',
|
||||||
@ -171,16 +306,18 @@ describe('DotnetVersionResolver tests', () => {
|
|||||||
'3.1.*',
|
'3.1.*',
|
||||||
'3.1.X',
|
'3.1.X',
|
||||||
'3.1.2',
|
'3.1.2',
|
||||||
'3.1.0-preview1'
|
'3.1.0-preview1',
|
||||||
|
'6.0.2xx'
|
||||||
]).test(
|
]).test(
|
||||||
"if valid version: '%s' is supplied, it should return version object with some value",
|
'if valid version is supplied (%s), it should return version object with some value',
|
||||||
async version => {
|
async version => {
|
||||||
const dotnetVersionResolver = new installer.DotnetVersionResolver(
|
const dotnetVersionResolver = new installer.DotnetVersionResolver(
|
||||||
version
|
version
|
||||||
);
|
);
|
||||||
const versionObject = await dotnetVersionResolver.createDotNetVersion();
|
const versionObject =
|
||||||
|
await dotnetVersionResolver.createDotNetVersion();
|
||||||
|
|
||||||
expect(!!versionObject.value).toBeTruthy;
|
expect(!!versionObject.value).toBe(true);
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -210,7 +347,7 @@ describe('DotnetVersionResolver tests', () => {
|
|||||||
' 0 . 1 . 2 ',
|
' 0 . 1 . 2 ',
|
||||||
'invalid'
|
'invalid'
|
||||||
]).test(
|
]).test(
|
||||||
"if invalid version: '%s' is supplied, it should throw",
|
'if invalid version is supplied (%s), it should throw',
|
||||||
async version => {
|
async version => {
|
||||||
const dotnetVersionResolver = new installer.DotnetVersionResolver(
|
const dotnetVersionResolver = new installer.DotnetVersionResolver(
|
||||||
version
|
version
|
||||||
@ -222,29 +359,50 @@ describe('DotnetVersionResolver tests', () => {
|
|||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
each(['3.1', '3.1.x', '3.1.*', '3.1.X']).test(
|
each(['3', '3.1', '3.1.x', '3.1.*', '3.1.X', '6.0.2xx']).test(
|
||||||
"if version: '%s' that can be resolved to 'channel' option is supplied, it should set quality flag to 'true' and type to 'channel' in version object",
|
"if version that can be resolved to 'channel' option is supplied (%s), it should set type to 'channel' in version object",
|
||||||
async version => {
|
async version => {
|
||||||
const dotnetVersionResolver = new installer.DotnetVersionResolver(
|
const dotnetVersionResolver = new installer.DotnetVersionResolver(
|
||||||
version
|
version
|
||||||
);
|
);
|
||||||
const versionObject = await dotnetVersionResolver.createDotNetVersion();
|
const versionObject =
|
||||||
|
await dotnetVersionResolver.createDotNetVersion();
|
||||||
|
|
||||||
expect(versionObject.type.toLowerCase().includes('channel')).toBeTruthy;
|
expect(versionObject.type.toLowerCase().includes('channel')).toBe(
|
||||||
expect(versionObject.qualityFlag).toBeTruthy;
|
true
|
||||||
|
);
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
each(['6.0', '6.0.x', '6.0.*', '6.0.X', '6.0.2xx']).test(
|
||||||
|
"if version that can be resolved to 'channel' option is supplied and its major tag is >= 6 (%s), it should set type to 'channel' and qualityFlag to 'true' in version object",
|
||||||
|
async version => {
|
||||||
|
const dotnetVersionResolver = new installer.DotnetVersionResolver(
|
||||||
|
version
|
||||||
|
);
|
||||||
|
const versionObject =
|
||||||
|
await dotnetVersionResolver.createDotNetVersion();
|
||||||
|
|
||||||
|
expect(versionObject.type.toLowerCase().includes('channel')).toBe(
|
||||||
|
true
|
||||||
|
);
|
||||||
|
expect(versionObject.qualityFlag).toBe(true);
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
each(['3.1.2', '3.1.0-preview1']).test(
|
each(['3.1.2', '3.1.0-preview1']).test(
|
||||||
"if version: '%s' that can be resolved to 'version' option is supplied, it should set quality flag to 'false' and type to 'version' in version object",
|
"if version that can be resolved to 'version' option is supplied (%s), it should set quality flag to 'false' and type to 'version' in version object",
|
||||||
async version => {
|
async version => {
|
||||||
const dotnetVersionResolver = new installer.DotnetVersionResolver(
|
const dotnetVersionResolver = new installer.DotnetVersionResolver(
|
||||||
version
|
version
|
||||||
);
|
);
|
||||||
const versionObject = await dotnetVersionResolver.createDotNetVersion();
|
const versionObject =
|
||||||
|
await dotnetVersionResolver.createDotNetVersion();
|
||||||
|
|
||||||
expect(versionObject.type.toLowerCase().includes('version')).toBeTruthy;
|
expect(versionObject.type.toLowerCase().includes('version')).toBe(
|
||||||
expect(versionObject.qualityFlag).toBeFalsy;
|
true
|
||||||
|
);
|
||||||
|
expect(versionObject.qualityFlag).toBe(false);
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -254,37 +412,32 @@ describe('DotnetVersionResolver tests', () => {
|
|||||||
const dotnetVersionResolver = new installer.DotnetVersionResolver(
|
const dotnetVersionResolver = new installer.DotnetVersionResolver(
|
||||||
version
|
version
|
||||||
);
|
);
|
||||||
const versionObject = await dotnetVersionResolver.createDotNetVersion();
|
const versionObject =
|
||||||
const windowsRegEx = new RegExp(/^-[VC]/);
|
await dotnetVersionResolver.createDotNetVersion();
|
||||||
const nonWindowsRegEx = new RegExp(/^--[vc]/);
|
const windowsRegEx = new RegExp(/^-(Version|Channel)/);
|
||||||
|
const nonWindowsRegEx = new RegExp(/^--(version|channel)/);
|
||||||
|
|
||||||
if (IS_WINDOWS) {
|
if (IS_WINDOWS) {
|
||||||
expect(windowsRegEx.test(versionObject.type)).toBeTruthy;
|
expect(windowsRegEx.test(versionObject.type)).toBe(true);
|
||||||
expect(nonWindowsRegEx.test(versionObject.type)).toBeFalsy;
|
expect(nonWindowsRegEx.test(versionObject.type)).toBe(false);
|
||||||
} else {
|
} else {
|
||||||
expect(nonWindowsRegEx.test(versionObject.type)).toBeTruthy;
|
expect(nonWindowsRegEx.test(versionObject.type)).toBe(true);
|
||||||
expect(windowsRegEx.test(versionObject.type)).toBeFalsy;
|
expect(windowsRegEx.test(versionObject.type)).toBe(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
it(`should throw if dotnet-version is supplied in A.B.Cxx syntax with major tag lower that 5`, async () => {
|
||||||
|
const version = '3.0.1xx';
|
||||||
|
const dotnetVersionResolver = new installer.DotnetVersionResolver(
|
||||||
|
version
|
||||||
|
);
|
||||||
|
await expect(
|
||||||
|
async () => await dotnetVersionResolver.createDotNetVersion()
|
||||||
|
).rejects.toThrow(
|
||||||
|
`'dotnet-version' was supplied in invalid format: ${version}! The A.B.Cxx syntax is available since the .NET 5.0 release.`
|
||||||
|
);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
function normalizeFileContents(contents: string): string {
|
|
||||||
return contents
|
|
||||||
.trim()
|
|
||||||
.replace(new RegExp('\r\n', 'g'), '\n')
|
|
||||||
.replace(new RegExp('\r', 'g'), '\n');
|
|
||||||
}
|
|
||||||
|
|
||||||
async function getDotnet(
|
|
||||||
version: string,
|
|
||||||
quality: string = ''
|
|
||||||
): Promise<string> {
|
|
||||||
const dotnetInstaller = new installer.DotnetCoreInstaller(
|
|
||||||
version,
|
|
||||||
quality as QualityOptions
|
|
||||||
);
|
|
||||||
const installedVersion = await dotnetInstaller.installDotnet();
|
|
||||||
installer.DotnetCoreInstaller.addToPath();
|
|
||||||
return installedVersion;
|
|
||||||
}
|
|
||||||
|
@ -1,15 +0,0 @@
|
|||||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
|
||||||
using System;
|
|
||||||
|
|
||||||
namespace sample_csproj
|
|
||||||
{
|
|
||||||
[TestClass]
|
|
||||||
public class Program
|
|
||||||
{
|
|
||||||
[TestMethod]
|
|
||||||
public void TestMethod1()
|
|
||||||
{
|
|
||||||
Console.WriteLine("Hello, World!");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,18 +0,0 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
|
||||||
|
|
||||||
<PropertyGroup>
|
|
||||||
<TargetFrameworks>netcoreapp3.1;netcoreapp3.0;netcoreapp2.2</TargetFrameworks>
|
|
||||||
<RootNamespace>sample_csproj</RootNamespace>
|
|
||||||
|
|
||||||
<IsPackable>false</IsPackable>
|
|
||||||
</PropertyGroup>
|
|
||||||
|
|
||||||
<ItemGroup>
|
|
||||||
<!-- These packages will be downloaded over the network for testing proxy settings -->
|
|
||||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.5.0" />
|
|
||||||
<PackageReference Include="MSTest.TestAdapter" Version="2.1.0" />
|
|
||||||
<PackageReference Include="MSTest.TestFramework" Version="2.1.0" />
|
|
||||||
<PackageReference Include="coverlet.collector" Version="1.2.0" />
|
|
||||||
</ItemGroup>
|
|
||||||
|
|
||||||
</Project>
|
|
@ -1,98 +1,173 @@
|
|||||||
import * as io from '@actions/io';
|
|
||||||
import * as core from '@actions/core';
|
import * as core from '@actions/core';
|
||||||
import fs from 'fs';
|
import fs from 'fs';
|
||||||
import os from 'os';
|
import semver from 'semver';
|
||||||
import path from 'path';
|
import * as auth from '../src/authutil';
|
||||||
|
|
||||||
import * as setup from '../src/setup-dotnet';
|
import * as setup from '../src/setup-dotnet';
|
||||||
import {IS_WINDOWS} from '../src/utils';
|
import {DotnetCoreInstaller} from '../src/installer';
|
||||||
import {IS_LINUX} from '../src/utils';
|
|
||||||
|
|
||||||
let toolDir: string;
|
|
||||||
|
|
||||||
if (IS_WINDOWS) {
|
|
||||||
toolDir = path.join(process.env['PROGRAMFILES'] + '', 'dotnet');
|
|
||||||
} else if (IS_LINUX) {
|
|
||||||
toolDir = '/usr/share/dotnet';
|
|
||||||
} else {
|
|
||||||
toolDir = path.join(process.env['HOME'] + '', '.dotnet');
|
|
||||||
}
|
|
||||||
|
|
||||||
const tempDir = path.join(__dirname, 'runner', 'temp2');
|
|
||||||
|
|
||||||
describe('setup-dotnet tests', () => {
|
describe('setup-dotnet tests', () => {
|
||||||
let getInputSpy = jest.spyOn(core, 'getInput');
|
const inputs = {} as any;
|
||||||
let getMultilineInputSpy = jest.spyOn(core, 'getMultilineInput');
|
|
||||||
let setOutputSpy = jest.spyOn(core, 'setOutput');
|
|
||||||
|
|
||||||
let inputs = {} as any;
|
const getInputSpy = jest.spyOn(core, 'getInput');
|
||||||
|
const getMultilineInputSpy = jest.spyOn(core, 'getMultilineInput');
|
||||||
|
const setFailedSpy = jest.spyOn(core, 'setFailed');
|
||||||
|
const warningSpy = jest.spyOn(core, 'warning');
|
||||||
|
const debugSpy = jest.spyOn(core, 'debug');
|
||||||
|
const infoSpy = jest.spyOn(core, 'info');
|
||||||
|
const setOutputSpy = jest.spyOn(core, 'setOutput');
|
||||||
|
|
||||||
beforeAll(async () => {
|
const existsSyncSpy = jest.spyOn(fs, 'existsSync');
|
||||||
process.env.RUNNER_TOOL_CACHE = toolDir;
|
|
||||||
process.env.DOTNET_INSTALL_DIR = toolDir;
|
|
||||||
process.env.RUNNER_TEMP = tempDir;
|
|
||||||
try {
|
|
||||||
await io.rmRF(`${toolDir}/*`);
|
|
||||||
await io.rmRF(`${tempDir}/*`);
|
|
||||||
} catch (err) {
|
|
||||||
console.log(err.message);
|
|
||||||
console.log('Failed to remove test directories');
|
|
||||||
}
|
|
||||||
}, 30000);
|
|
||||||
|
|
||||||
afterEach(async () => {
|
const maxSatisfyingSpy = jest.spyOn(semver, 'maxSatisfying');
|
||||||
try {
|
|
||||||
await io.rmRF(path.join(process.cwd(), 'global.json'));
|
const installDotnetSpy = jest.spyOn(
|
||||||
await io.rmRF(`${toolDir}/*`);
|
DotnetCoreInstaller.prototype,
|
||||||
await io.rmRF(`${tempDir}/*`);
|
'installDotnet'
|
||||||
} catch (err) {
|
);
|
||||||
console.log(err.message);
|
const addToPathSpy = jest.spyOn(DotnetCoreInstaller, 'addToPath');
|
||||||
console.log('Failed to remove test directories');
|
|
||||||
}
|
const configAuthenticationSpy = jest.spyOn(auth, 'configAuthentication');
|
||||||
}, 30000);
|
|
||||||
|
describe('run() tests', () => {
|
||||||
|
beforeEach(() => {
|
||||||
|
getMultilineInputSpy.mockImplementation(input => inputs[input as string]);
|
||||||
|
getInputSpy.mockImplementation(input => inputs[input as string]);
|
||||||
|
});
|
||||||
|
|
||||||
|
afterEach(() => {
|
||||||
|
jest.clearAllMocks();
|
||||||
|
jest.resetAllMocks();
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should fail the action if global-json-file input is present, but the file does not exist in the file system', async () => {
|
||||||
|
inputs['global-json-file'] = 'fictitious.json';
|
||||||
|
inputs['dotnet-version'] = [];
|
||||||
|
|
||||||
|
const expectedErrorMessage = `The specified global.json file '${inputs['global-json-file']}' does not exist`;
|
||||||
|
|
||||||
it('Acquires version of dotnet from global.json if no matching version is installed', async () => {
|
|
||||||
const globalJsonPath = path.join(process.cwd(), 'global.json');
|
|
||||||
const jsonContents = `{${os.EOL}"sdk": {${os.EOL}"version": "3.1.201"${os.EOL}}${os.EOL}}`;
|
|
||||||
if (!fs.existsSync(globalJsonPath)) {
|
|
||||||
fs.writeFileSync(globalJsonPath, jsonContents);
|
|
||||||
}
|
|
||||||
await setup.run();
|
await setup.run();
|
||||||
|
expect(setFailedSpy).toHaveBeenCalledWith(expectedErrorMessage);
|
||||||
|
});
|
||||||
|
|
||||||
expect(fs.existsSync(path.join(toolDir, 'sdk', '3.1.201'))).toBe(true);
|
test(`if 'dotnet-version' and 'global-json-file' inputs aren't present, should log into debug output, try to find global.json in the repo root, fail and log message into info output`, async () => {
|
||||||
if (IS_WINDOWS) {
|
inputs['global-json-file'] = '';
|
||||||
expect(fs.existsSync(path.join(toolDir, 'dotnet.exe'))).toBe(true);
|
inputs['dotnet-version'] = [];
|
||||||
} else {
|
|
||||||
expect(fs.existsSync(path.join(toolDir, 'dotnet'))).toBe(true);
|
|
||||||
}
|
|
||||||
}, 400000);
|
|
||||||
|
|
||||||
it("Sets output with the latest installed by action version if global.json file isn't specified", async () => {
|
maxSatisfyingSpy.mockImplementation(() => null);
|
||||||
inputs['dotnet-version'] = ['3.1.201', '6.0.401'];
|
setOutputSpy.mockImplementation(() => {});
|
||||||
|
|
||||||
getMultilineInputSpy.mockImplementation(input => inputs[input]);
|
const expectedDebugMessage =
|
||||||
|
'No version found, trying to find version from global.json';
|
||||||
|
const expectedInfoMessage = `The global.json wasn't found in the root directory. No .NET version will be installed.`;
|
||||||
|
|
||||||
await setup.run();
|
await setup.run();
|
||||||
|
|
||||||
expect(setOutputSpy).toBeCalledWith('dotnet-version', '6.0.401');
|
expect(debugSpy).toHaveBeenCalledWith(expectedDebugMessage);
|
||||||
}, 400000);
|
expect(existsSyncSpy).toHaveBeenCalled();
|
||||||
|
expect(infoSpy).toHaveBeenCalledWith(expectedInfoMessage);
|
||||||
|
});
|
||||||
|
|
||||||
it("Sets output with the version specified in global.json, if it's present", async () => {
|
it('should fail the action if quality is supplied but its value is not supported', async () => {
|
||||||
const globalJsonPath = path.join(process.cwd(), 'global.json');
|
inputs['global-json-file'] = '';
|
||||||
const jsonContents = `{${os.EOL}"sdk": {${os.EOL}"version": "3.0.103"${os.EOL}}${os.EOL}}`;
|
inputs['dotnet-version'] = ['6.0'];
|
||||||
if (!fs.existsSync(globalJsonPath)) {
|
inputs['dotnet-quality'] = 'fictitiousQuality';
|
||||||
fs.writeFileSync(globalJsonPath, jsonContents);
|
|
||||||
}
|
|
||||||
|
|
||||||
inputs['dotnet-version'] = ['3.1.201', '6.0.401'];
|
const expectedErrorMessage = `Value '${inputs['dotnet-quality']}' is not supported for the 'dotnet-quality' option. Supported values are: daily, signed, validated, preview, ga.`;
|
||||||
inputs['global-json-file'] = './global.json';
|
|
||||||
|
|
||||||
getMultilineInputSpy.mockImplementation(input => inputs[input]);
|
await setup.run();
|
||||||
|
expect(setFailedSpy).toHaveBeenCalledWith(expectedErrorMessage);
|
||||||
|
});
|
||||||
|
|
||||||
getInputSpy.mockImplementation(input => inputs[input]);
|
it('should call installDotnet() multiple times if dotnet-version multiline input is provided', async () => {
|
||||||
|
inputs['global-json-file'] = '';
|
||||||
|
inputs['dotnet-version'] = ['6.0', '7.0'];
|
||||||
|
inputs['dotnet-quality'] = '';
|
||||||
|
|
||||||
|
installDotnetSpy.mockImplementation(() => Promise.resolve(''));
|
||||||
|
|
||||||
|
await setup.run();
|
||||||
|
expect(installDotnetSpy).toHaveBeenCalledTimes(2);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should call addToPath() after installation complete', async () => {
|
||||||
|
inputs['global-json-file'] = '';
|
||||||
|
inputs['dotnet-version'] = ['6.0', '7.0'];
|
||||||
|
inputs['dotnet-quality'] = '';
|
||||||
|
|
||||||
|
installDotnetSpy.mockImplementation(() => Promise.resolve(''));
|
||||||
|
addToPathSpy.mockImplementation(() => {});
|
||||||
|
|
||||||
|
await setup.run();
|
||||||
|
expect(addToPathSpy).toHaveBeenCalledTimes(1);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should call auth.configAuthentication() if source-url input is provided', async () => {
|
||||||
|
inputs['global-json-file'] = '';
|
||||||
|
inputs['dotnet-version'] = [];
|
||||||
|
inputs['dotnet-quality'] = '';
|
||||||
|
inputs['source-url'] = 'fictitious.source.url';
|
||||||
|
|
||||||
|
configAuthenticationSpy.mockImplementation(() => {});
|
||||||
|
|
||||||
|
await setup.run();
|
||||||
|
expect(configAuthenticationSpy).toHaveBeenCalledWith(
|
||||||
|
inputs['source-url'],
|
||||||
|
undefined
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should call auth.configAuthentication() with proper parameters if source-url and config-file inputs are provided', async () => {
|
||||||
|
inputs['global-json-file'] = '';
|
||||||
|
inputs['dotnet-version'] = [];
|
||||||
|
inputs['dotnet-quality'] = '';
|
||||||
|
inputs['source-url'] = 'fictitious.source.url';
|
||||||
|
inputs['config-file'] = 'fictitious.path';
|
||||||
|
|
||||||
|
configAuthenticationSpy.mockImplementation(() => {});
|
||||||
|
setOutputSpy.mockImplementation(() => {});
|
||||||
|
|
||||||
|
await setup.run();
|
||||||
|
expect(configAuthenticationSpy).toHaveBeenCalledWith(
|
||||||
|
inputs['source-url'],
|
||||||
|
inputs['config-file']
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should call setOutput() after installation complete successfully', async () => {
|
||||||
|
inputs['dotnet-version'] = ['6.0.300'];
|
||||||
|
|
||||||
|
installDotnetSpy.mockImplementation(() =>
|
||||||
|
Promise.resolve(`${inputs['dotnet-version']}`)
|
||||||
|
);
|
||||||
|
addToPathSpy.mockImplementation(() => {});
|
||||||
|
|
||||||
|
await setup.run();
|
||||||
|
expect(setOutputSpy).toHaveBeenCalledTimes(1);
|
||||||
|
});
|
||||||
|
|
||||||
|
it(`shouldn't call setOutput() if parsing dotnet-installer logs failed`, async () => {
|
||||||
|
inputs['dotnet-version'] = ['6.0.300'];
|
||||||
|
const warningMessage = `Failed to output the installed version of .NET. The 'dotnet-version' output will not be set.`;
|
||||||
|
|
||||||
|
installDotnetSpy.mockImplementation(() => Promise.resolve(null));
|
||||||
|
addToPathSpy.mockImplementation(() => {});
|
||||||
|
|
||||||
|
await setup.run();
|
||||||
|
expect(warningSpy).toHaveBeenCalledWith(warningMessage);
|
||||||
|
expect(setOutputSpy).not.toHaveBeenCalled();
|
||||||
|
});
|
||||||
|
|
||||||
|
it(`shouldn't call setOutput() if actions didn't install .NET`, async () => {
|
||||||
|
inputs['dotnet-version'] = [];
|
||||||
|
const warningMessage = `The 'dotnet-version' output will not be set.`;
|
||||||
|
|
||||||
|
addToPathSpy.mockImplementation(() => {});
|
||||||
|
|
||||||
await setup.run();
|
await setup.run();
|
||||||
|
|
||||||
expect(setOutputSpy).toBeCalledWith('dotnet-version', '3.0.103');
|
expect(infoSpy).toHaveBeenCalledWith(warningMessage);
|
||||||
}, 400000);
|
expect(setOutputSpy).not.toHaveBeenCalled();
|
||||||
|
});
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
@ -1,73 +1,117 @@
|
|||||||
if (!$args[0])
|
<#
|
||||||
{
|
.DESCRIPTION
|
||||||
throw "Must supply dotnet version argument"
|
Verifies that installed on the machine .NET SDK versions match the input patterns.
|
||||||
|
Optionally checks that the nuget.config file is generated correctly.
|
||||||
|
|
||||||
|
.PARAMETER Patterns
|
||||||
|
Specifies the regular expression patterns that should be matched with the installed
|
||||||
|
on the machine .NET SDK versions. The number of patterns should be equal to the number
|
||||||
|
of installed .NET versions.
|
||||||
|
|
||||||
|
.PARAMETER CheckNugetConfig
|
||||||
|
Switches the check for the existence of the nuget.config file.
|
||||||
|
|
||||||
|
.EXAMPLE
|
||||||
|
PS> .\verify-dotnet.ps1 -Paterns "^3.1.200$", "^6.0" -CheckNugetConfig
|
||||||
|
#>
|
||||||
|
|
||||||
|
param(
|
||||||
|
[ValidateNotNullOrEmpty()]
|
||||||
|
[Parameter(Mandatory=$true)]
|
||||||
|
[string[]]$Patterns,
|
||||||
|
[switch]$CheckNugetConfig
|
||||||
|
)
|
||||||
|
|
||||||
|
$PatternsList = [System.Collections.ArrayList]($Patterns)
|
||||||
|
|
||||||
|
if ($CheckNugetConfig.IsPresent -and !(Test-Path "../nuget.config")) {
|
||||||
|
throw "The nuget.config file is not generated correctly."
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Write-Host "These patterns were supplied to the script: $($PatternsList -join ', ')."
|
||||||
$dotnet = Get-Command dotnet | Select-Object -First 1 | ForEach-Object { $_.Path }
|
$dotnet = Get-Command dotnet | Select-Object -First 1 | ForEach-Object { $_.Path }
|
||||||
Write-Host "Found '$dotnet'"
|
Write-Host "Found: '$dotnet'"
|
||||||
|
|
||||||
if($args.count -eq 1)
|
# SDKs are listed on multiple lines with the path afterwards in square brackets
|
||||||
|
$Versions = & $dotnet --list-sdks | ForEach-Object { $_.SubString(0, $_.IndexOf('[')).Trim() }
|
||||||
|
Write-Host "Found installed versions: $($Versions -join ', ')."
|
||||||
|
$InstalledVersionCount = $Versions.Count
|
||||||
|
|
||||||
|
foreach($version in $Versions)
|
||||||
{
|
{
|
||||||
$version = & $dotnet --version | Out-String | ForEach-Object { $_.Trim() }
|
foreach($pattern in $PatternsList)
|
||||||
Write-Host "Version $version"
|
|
||||||
if (-not ($version.StartsWith($args[0].ToString())))
|
|
||||||
{
|
{
|
||||||
Write-Host "PATH='$env:PATH'"
|
if ($version -match $pattern)
|
||||||
throw "Unexpected version"
|
{
|
||||||
|
$PatternsList.Remove($pattern)
|
||||||
|
$InstalledVersionCount--
|
||||||
|
break
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($args[1])
|
if ( $InstalledVersionCount -ne 0)
|
||||||
{
|
{
|
||||||
# SDKs are listed on multiple lines with the path afterwards in square brackets
|
throw "An unexpected version of Dotnet is found on the machine, please check the correctness of the -Patterns input."
|
||||||
$versions = & $dotnet --list-sdks | ForEach-Object { $_.SubString(0, $_.IndexOf('[')).Trim() }
|
|
||||||
Write-Host "Installed versions: $versions"
|
|
||||||
$InstalledVersionCount = 0
|
|
||||||
foreach($arg in $args){
|
|
||||||
foreach ($version in $versions)
|
|
||||||
{
|
|
||||||
if ($version.StartsWith($arg.ToString()))
|
|
||||||
{
|
|
||||||
$InstalledVersionCount++
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if ( $InstalledVersionCount -ne $args.Count)
|
|
||||||
{
|
|
||||||
Write-Host "PATH='$env:PATH'"
|
|
||||||
throw "Unexpected version"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Write-Host "Building sample csproj"
|
$workingDir = Get-Location
|
||||||
& $dotnet build __tests__/sample-csproj/ --no-cache
|
$testProjectDir = "./__tests__/e2e-test-csproj"
|
||||||
if ($LASTEXITCODE -ne 0)
|
Write-Host "Changing directory to the $testProjectDir"
|
||||||
|
Set-Location $testProjectDir
|
||||||
|
|
||||||
|
$targetFrameworkVersionMap = @{
|
||||||
|
"1.0" = "netcoreapp1.0";
|
||||||
|
"1.1" = "netcoreapp1.1";
|
||||||
|
"2.0" = "netcoreapp2.0";
|
||||||
|
"2.1" = "netcoreapp2.1";
|
||||||
|
"2.2" = "netcoreapp2.2";
|
||||||
|
"3.0" = "netcoreapp3.0";
|
||||||
|
"3.1" = "netcoreapp3.1";
|
||||||
|
"5.0" = "net5.0";
|
||||||
|
"6.0" = "net6.0";
|
||||||
|
"7.0" = "net7.0";
|
||||||
|
"8.0" = "net8.0";
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach ($version in $Versions)
|
||||||
{
|
{
|
||||||
throw "Unexpected exit code $LASTEXITCODE"
|
# Creating temporary global.json file inside e2e-test-csproj dir and setting exact version of .NET inside allows to override default behavior of .NET and run build and tests on that exact version.
|
||||||
|
Write-Host "Creating temporary global.json file for $version .NET version."
|
||||||
|
& $dotnet new globaljson --sdk-version $version --force | Out-Null
|
||||||
|
if (!(Test-Path "./global.json"))
|
||||||
|
{
|
||||||
|
throw "An error occured while creating the global.json file. Exit code: $LASTEXITCODE"
|
||||||
|
}
|
||||||
|
Write-Host "The global.json file for the version $version is created. Currently used .NET version is: $(& $dotnet --version)."
|
||||||
|
|
||||||
|
# Environment variable TEST_TARGET_FRAMEWORK is used inside the test.csproj file to target required framework version
|
||||||
|
$version -match "^(?<key>\d+\.\d+)" | Out-Null
|
||||||
|
if (!($targetFrameworkVersionMap.ContainsKey($Matches.key)))
|
||||||
|
{
|
||||||
|
throw "The map with the framework targets doesn't contain a target name for the version $version."
|
||||||
|
}
|
||||||
|
Write-Host "Setting the TEST_TARGET_FRAMEWORK environment variable to $($targetFrameworkVersionMap[$Matches.key])"
|
||||||
|
[Environment]::SetEnvironmentVariable('TEST_TARGET_FRAMEWORK', $($targetFrameworkVersionMap[$Matches.key]))
|
||||||
|
|
||||||
|
Write-Host "Building test C# project with $version .NET version."
|
||||||
|
& $dotnet build --no-cache
|
||||||
|
if ($LASTEXITCODE -ne 0)
|
||||||
|
{
|
||||||
|
throw "Building process is not successful, exit code: $LASTEXITCODE"
|
||||||
|
}
|
||||||
|
|
||||||
|
Write-Host "Testing compiled C# project with $version .NET version."
|
||||||
|
& $dotnet test --no-build
|
||||||
|
if ($LASTEXITCODE -ne 0)
|
||||||
|
{
|
||||||
|
throw "Testing process is not successful, exit code: $LASTEXITCODE"
|
||||||
|
}
|
||||||
|
|
||||||
|
Write-Host "Tests are completed successfully!"
|
||||||
|
|
||||||
|
Write-Host "Removing temporary global.json file."
|
||||||
|
Remove-Item ./global.json
|
||||||
}
|
}
|
||||||
|
|
||||||
Write-Host "Testing compiled app"
|
Set-Location $workingDir
|
||||||
$sample_output = "$(dotnet test __tests__/sample-csproj/ --no-build)"
|
|
||||||
Write-Host "Sample output: $sample_output"
|
|
||||||
# For Side-by-Side installs we want to run the tests twice, for a single install the tests will run once
|
|
||||||
if ($args[1])
|
|
||||||
{
|
|
||||||
if ($sample_output -notlike "*Test Run Successful.*Test Run Successful.*")
|
|
||||||
{
|
|
||||||
throw "Unexpected output"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if ($args[2])
|
|
||||||
{
|
|
||||||
if ($sample_output -notlike "*Test Run Successful.*Test Run Successful.*Test Run Successful.*")
|
|
||||||
{
|
|
||||||
throw "Unexpected output"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if ($sample_output -notlike "*Test Run Successful.*")
|
|
||||||
{
|
|
||||||
throw "Unexpected output"
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,44 +0,0 @@
|
|||||||
if [ -z "$1" ]; then
|
|
||||||
echo "Must supply dotnet version argument"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ ! -f "../nuget.config" ]; then
|
|
||||||
echo "nuget file not generated correctly"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
dotnet_version="$(dotnet --version)"
|
|
||||||
echo "Found dotnet version '$dotnet_version'"
|
|
||||||
if [ -z "$(echo $dotnet_version | grep $1)" ]; then
|
|
||||||
echo "Unexpected version"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -n "$2" ]; then
|
|
||||||
dotnet_version="$(dotnet --list-sdks)"
|
|
||||||
echo "Found dotnet version '$dotnet_version'"
|
|
||||||
if [ -z "$(echo $dotnet_version | grep $2)" ]; then
|
|
||||||
echo "Unexpected version"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "Building sample csproj"
|
|
||||||
dotnet build __tests__/sample-csproj/ --no-cache || exit 1
|
|
||||||
|
|
||||||
echo "Testing compiled app"
|
|
||||||
sample_output=$(dotnet test __tests__/sample-csproj/ --no-build)
|
|
||||||
echo "Sample output: $sample_output"
|
|
||||||
# For Side-by-Side installs we want to run the tests twice, for a single install the tests will run once
|
|
||||||
if [ -n "$2" ]; then
|
|
||||||
if [ -z "$(echo $sample_output | grep "Test Run Successful.*Test Run Successful.")" ]; then
|
|
||||||
echo "Unexpected output"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
if [ -z "$(echo $sample_output | grep "Test Run Successful.")" ]; then
|
|
||||||
echo "Unexpected output"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
fi
|
|
@ -6,7 +6,7 @@ branding:
|
|||||||
color: green
|
color: green
|
||||||
inputs:
|
inputs:
|
||||||
dotnet-version:
|
dotnet-version:
|
||||||
description: 'Optional SDK version(s) to use. If not provided, will install global.json version when available. Examples: 2.2.104, 3.1, 3.1.x, 3.x'
|
description: 'Optional SDK version(s) to use. If not provided, will install global.json version when available. Examples: 2.2.104, 3.1, 3.1.x, 3.x, 6.0.2xx'
|
||||||
dotnet-quality:
|
dotnet-quality:
|
||||||
description: 'Optional quality of the build. The possible values are: daily, signed, validated, preview, ga.'
|
description: 'Optional quality of the build. The possible values are: daily, signed, validated, preview, ga.'
|
||||||
global-json-file:
|
global-json-file:
|
||||||
|
150
dist/index.js
vendored
150
dist/index.js
vendored
@ -45,7 +45,7 @@ function configAuthentication(feedUrl, existingFileLocation = '', processRoot =
|
|||||||
}
|
}
|
||||||
exports.configAuthentication = configAuthentication;
|
exports.configAuthentication = configAuthentication;
|
||||||
function isValidKey(key) {
|
function isValidKey(key) {
|
||||||
return /^[\w\-\.]+$/i.test(key);
|
return /^[\w\-.]+$/i.test(key);
|
||||||
}
|
}
|
||||||
function getExistingNugetConfig(processRoot) {
|
function getExistingNugetConfig(processRoot) {
|
||||||
const defaultConfigName = 'nuget.config';
|
const defaultConfigName = 'nuget.config';
|
||||||
@ -60,9 +60,9 @@ function getExistingNugetConfig(processRoot) {
|
|||||||
function writeFeedToFile(feedUrl, existingFileLocation, tempFileLocation) {
|
function writeFeedToFile(feedUrl, existingFileLocation, tempFileLocation) {
|
||||||
var _a, _b;
|
var _a, _b;
|
||||||
core.info(`dotnet-auth: Finding any source references in ${existingFileLocation}, writing a new temporary configuration file with credentials to ${tempFileLocation}`);
|
core.info(`dotnet-auth: Finding any source references in ${existingFileLocation}, writing a new temporary configuration file with credentials to ${tempFileLocation}`);
|
||||||
let sourceKeys = [];
|
const sourceKeys = [];
|
||||||
let owner = core.getInput('owner');
|
let owner = core.getInput('owner');
|
||||||
let sourceUrl = feedUrl;
|
const sourceUrl = feedUrl;
|
||||||
if (!owner) {
|
if (!owner) {
|
||||||
owner = github.context.repo.owner;
|
owner = github.context.repo.owner;
|
||||||
}
|
}
|
||||||
@ -132,7 +132,7 @@ function writeFeedToFile(feedUrl, existingFileLocation, tempFileLocation) {
|
|||||||
}
|
}
|
||||||
];
|
];
|
||||||
if (!sourceKeys.length) {
|
if (!sourceKeys.length) {
|
||||||
let keystring = 'Source';
|
const keystring = 'Source';
|
||||||
xmlSource[1].configuration.push({
|
xmlSource[1].configuration.push({
|
||||||
packageSources: [
|
packageSources: [
|
||||||
{
|
{
|
||||||
@ -238,11 +238,12 @@ const exec = __importStar(__nccwpck_require__(1514));
|
|||||||
const io = __importStar(__nccwpck_require__(7436));
|
const io = __importStar(__nccwpck_require__(7436));
|
||||||
const hc = __importStar(__nccwpck_require__(6255));
|
const hc = __importStar(__nccwpck_require__(6255));
|
||||||
const fs_1 = __nccwpck_require__(7147);
|
const fs_1 = __nccwpck_require__(7147);
|
||||||
const promises_1 = __nccwpck_require__(3292);
|
|
||||||
const path_1 = __importDefault(__nccwpck_require__(1017));
|
const path_1 = __importDefault(__nccwpck_require__(1017));
|
||||||
const os_1 = __importDefault(__nccwpck_require__(2037));
|
const os_1 = __importDefault(__nccwpck_require__(2037));
|
||||||
const semver_1 = __importDefault(__nccwpck_require__(5911));
|
const semver_1 = __importDefault(__nccwpck_require__(5911));
|
||||||
const utils_1 = __nccwpck_require__(918);
|
const utils_1 = __nccwpck_require__(918);
|
||||||
|
const QUALITY_INPUT_MINIMAL_MAJOR_TAG = 6;
|
||||||
|
const LATEST_PATCH_SYNTAX_MINIMAL_MAJOR_TAG = 5;
|
||||||
class DotnetVersionResolver {
|
class DotnetVersionResolver {
|
||||||
constructor(version) {
|
constructor(version) {
|
||||||
this.inputVersion = version.trim();
|
this.inputVersion = version.trim();
|
||||||
@ -250,35 +251,54 @@ class DotnetVersionResolver {
|
|||||||
}
|
}
|
||||||
resolveVersionInput() {
|
resolveVersionInput() {
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
if (!semver_1.default.validRange(this.inputVersion)) {
|
if (!semver_1.default.validRange(this.inputVersion) && !this.isLatestPatchSyntax()) {
|
||||||
throw new Error(`'dotnet-version' was supplied in invalid format: ${this.inputVersion}! Supported syntax: A.B.C, A.B, A.B.x, A, A.x`);
|
throw new Error(`The 'dotnet-version' was supplied in invalid format: ${this.inputVersion}! Supported syntax: A.B.C, A.B, A.B.x, A, A.x, A.B.Cxx`);
|
||||||
}
|
}
|
||||||
if (semver_1.default.valid(this.inputVersion)) {
|
if (semver_1.default.valid(this.inputVersion)) {
|
||||||
this.resolvedArgument.type = 'version';
|
this.createVersionArgument();
|
||||||
this.resolvedArgument.value = this.inputVersion;
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
const [major, minor] = this.inputVersion.split('.');
|
yield this.createChannelArgument();
|
||||||
if (this.isNumericTag(major)) {
|
|
||||||
this.resolvedArgument.type = 'channel';
|
|
||||||
if (this.isNumericTag(minor)) {
|
|
||||||
this.resolvedArgument.value = `${major}.${minor}`;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
const httpClient = new hc.HttpClient('actions/setup-dotnet', [], {
|
|
||||||
allowRetries: true,
|
|
||||||
maxRetries: 3
|
|
||||||
});
|
|
||||||
this.resolvedArgument.value = yield this.getLatestVersion(httpClient, [major, minor]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
this.resolvedArgument.qualityFlag = +major >= 6 ? true : false;
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
isNumericTag(versionTag) {
|
isNumericTag(versionTag) {
|
||||||
return /^\d+$/.test(versionTag);
|
return /^\d+$/.test(versionTag);
|
||||||
}
|
}
|
||||||
|
isLatestPatchSyntax() {
|
||||||
|
var _b, _c;
|
||||||
|
const majorTag = (_c = (_b = this.inputVersion.match(/^(?<majorTag>\d+)\.\d+\.\d{1}x{2}$/)) === null || _b === void 0 ? void 0 : _b.groups) === null || _c === void 0 ? void 0 : _c.majorTag;
|
||||||
|
if (majorTag &&
|
||||||
|
parseInt(majorTag) < LATEST_PATCH_SYNTAX_MINIMAL_MAJOR_TAG) {
|
||||||
|
throw new Error(`The 'dotnet-version' was supplied in invalid format: ${this.inputVersion}! The A.B.Cxx syntax is available since the .NET 5.0 release.`);
|
||||||
|
}
|
||||||
|
return majorTag ? true : false;
|
||||||
|
}
|
||||||
|
createVersionArgument() {
|
||||||
|
this.resolvedArgument.type = 'version';
|
||||||
|
this.resolvedArgument.value = this.inputVersion;
|
||||||
|
}
|
||||||
|
createChannelArgument() {
|
||||||
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
|
this.resolvedArgument.type = 'channel';
|
||||||
|
const [major, minor] = this.inputVersion.split('.');
|
||||||
|
if (this.isLatestPatchSyntax()) {
|
||||||
|
this.resolvedArgument.value = this.inputVersion;
|
||||||
|
}
|
||||||
|
else if (this.isNumericTag(major) && this.isNumericTag(minor)) {
|
||||||
|
this.resolvedArgument.value = `${major}.${minor}`;
|
||||||
|
}
|
||||||
|
else if (this.isNumericTag(major)) {
|
||||||
|
this.resolvedArgument.value = yield this.getLatestByMajorTag(major);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
// If "dotnet-version" is specified as *, x or X resolve latest version of .NET explicitly from LTS channel. The version argument will default to "latest" by install-dotnet script.
|
||||||
|
this.resolvedArgument.value = 'LTS';
|
||||||
|
}
|
||||||
|
this.resolvedArgument.qualityFlag =
|
||||||
|
parseInt(major) >= QUALITY_INPUT_MINIMAL_MAJOR_TAG ? true : false;
|
||||||
|
});
|
||||||
|
}
|
||||||
createDotNetVersion() {
|
createDotNetVersion() {
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
yield this.resolveVersionInput();
|
yield this.resolveVersionInput();
|
||||||
@ -296,17 +316,21 @@ class DotnetVersionResolver {
|
|||||||
return this.resolvedArgument;
|
return this.resolvedArgument;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
getLatestVersion(httpClient, versionParts) {
|
getLatestByMajorTag(majorTag) {
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
|
const httpClient = new hc.HttpClient('actions/setup-dotnet', [], {
|
||||||
|
allowRetries: true,
|
||||||
|
maxRetries: 3
|
||||||
|
});
|
||||||
const response = yield httpClient.getJson(DotnetVersionResolver.DotNetCoreIndexUrl);
|
const response = yield httpClient.getJson(DotnetVersionResolver.DotNetCoreIndexUrl);
|
||||||
const result = response.result || {};
|
const result = response.result || {};
|
||||||
let releasesInfo = result['releases-index'];
|
const releasesInfo = result['releases-index'];
|
||||||
let releaseInfo = releasesInfo.find(info => {
|
const releaseInfo = releasesInfo.find(info => {
|
||||||
let sdkParts = info['channel-version'].split('.');
|
const sdkParts = info['channel-version'].split('.');
|
||||||
return sdkParts[0] === versionParts[0];
|
return sdkParts[0] === majorTag;
|
||||||
});
|
});
|
||||||
if (!releaseInfo) {
|
if (!releaseInfo) {
|
||||||
throw new Error(`Could not find info for version ${versionParts.join('.')} at ${DotnetVersionResolver.DotNetCoreIndexUrl}`);
|
throw new Error(`Could not find info for version with major tag: "${majorTag}" at ${DotnetVersionResolver.DotNetCoreIndexUrl}`);
|
||||||
}
|
}
|
||||||
return releaseInfo['channel-version'];
|
return releaseInfo['channel-version'];
|
||||||
});
|
});
|
||||||
@ -341,7 +365,7 @@ class DotnetCoreInstaller {
|
|||||||
scriptArguments.push(option, this.quality);
|
scriptArguments.push(option, this.quality);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
core.warning(`'dotnet-quality' input can be used only with .NET SDK version in A.B, A.B.x, A and A.x formats where the major tag is higher than 5. You specified: ${this.version}. 'dotnet-quality' input is ignored.`);
|
core.warning(`The 'dotnet-quality' input can be used only with .NET SDK version in A.B, A.B.x, A, A.x and A.B.Cxx formats where the major tag is higher than 5. You specified: ${this.version}. 'dotnet-quality' input is ignored.`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
installDotnet() {
|
installDotnet() {
|
||||||
@ -398,22 +422,21 @@ class DotnetCoreInstaller {
|
|||||||
ignoreReturnCode: true,
|
ignoreReturnCode: true,
|
||||||
env: process.env
|
env: process.env
|
||||||
};
|
};
|
||||||
const { exitCode, stdout } = yield exec.getExecOutput(`"${scriptPath}"`, scriptArguments, getExecOutputOptions);
|
const { exitCode, stdout, stderr } = yield exec.getExecOutput(`"${scriptPath}"`, scriptArguments, getExecOutputOptions);
|
||||||
if (exitCode) {
|
if (exitCode) {
|
||||||
throw new Error(`Failed to install dotnet ${exitCode}. ${stdout}`);
|
throw new Error(`Failed to install dotnet, exit code: ${exitCode}. ${stderr}`);
|
||||||
}
|
}
|
||||||
return this.outputDotnetVersion(dotnetVersion.value);
|
return this.parseInstalledVersion(stdout);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
outputDotnetVersion(version) {
|
parseInstalledVersion(stdout) {
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
const regex = /(?<version>\d+\.\d+\.\d+[a-z0-9._-]*)/gm;
|
||||||
const installationPath = process.env['DOTNET_INSTALL_DIR'];
|
const matchedResult = regex.exec(stdout);
|
||||||
let versionsOnRunner = yield (0, promises_1.readdir)(path_1.default.join(installationPath.replace(/'/g, ''), 'sdk'));
|
if (!matchedResult) {
|
||||||
let installedVersion = semver_1.default.maxSatisfying(versionsOnRunner, version, {
|
core.warning(`Failed to parse installed by the script version of .NET`);
|
||||||
includePrerelease: true
|
return null;
|
||||||
});
|
}
|
||||||
return installedVersion;
|
return matchedResult.groups.version;
|
||||||
});
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
exports.DotnetCoreInstaller = DotnetCoreInstaller;
|
exports.DotnetCoreInstaller = DotnetCoreInstaller;
|
||||||
@ -513,7 +536,7 @@ function run() {
|
|||||||
const installedDotnetVersions = [];
|
const installedDotnetVersions = [];
|
||||||
const globalJsonFileInput = core.getInput('global-json-file');
|
const globalJsonFileInput = core.getInput('global-json-file');
|
||||||
if (globalJsonFileInput) {
|
if (globalJsonFileInput) {
|
||||||
const globalJsonPath = path_1.default.join(process.cwd(), globalJsonFileInput);
|
const globalJsonPath = path_1.default.resolve(process.cwd(), globalJsonFileInput);
|
||||||
if (!fs.existsSync(globalJsonPath)) {
|
if (!fs.existsSync(globalJsonPath)) {
|
||||||
throw new Error(`The specified global.json file '${globalJsonFileInput}' does not exist`);
|
throw new Error(`The specified global.json file '${globalJsonFileInput}' does not exist`);
|
||||||
}
|
}
|
||||||
@ -527,13 +550,13 @@ function run() {
|
|||||||
versions.push(getVersionFromGlobalJson(globalJsonPath));
|
versions.push(getVersionFromGlobalJson(globalJsonPath));
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
core.info(`global.json wasn't found in the root directory. No .NET version will be installed.`);
|
core.info(`The global.json wasn't found in the root directory. No .NET version will be installed.`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (versions.length) {
|
if (versions.length) {
|
||||||
const quality = core.getInput('dotnet-quality');
|
const quality = core.getInput('dotnet-quality');
|
||||||
if (quality && !qualityOptions.includes(quality)) {
|
if (quality && !qualityOptions.includes(quality)) {
|
||||||
throw new Error(`${quality} is not a supported value for 'dotnet-quality' option. Supported values are: daily, signed, validated, preview, ga.`);
|
throw new Error(`Value '${quality}' is not supported for the 'dotnet-quality' option. Supported values are: daily, signed, validated, preview, ga.`);
|
||||||
}
|
}
|
||||||
let dotnetInstaller;
|
let dotnetInstaller;
|
||||||
const uniqueVersions = new Set(versions);
|
const uniqueVersions = new Set(versions);
|
||||||
@ -549,13 +572,7 @@ function run() {
|
|||||||
if (sourceUrl) {
|
if (sourceUrl) {
|
||||||
auth.configAuthentication(sourceUrl, configFile);
|
auth.configAuthentication(sourceUrl, configFile);
|
||||||
}
|
}
|
||||||
const comparisonRange = globalJsonFileInput
|
outputInstalledVersion(installedDotnetVersions, globalJsonFileInput);
|
||||||
? versions[versions.length - 1]
|
|
||||||
: '*';
|
|
||||||
const versionToOutput = semver_1.default.maxSatisfying(installedDotnetVersions, comparisonRange, {
|
|
||||||
includePrerelease: true
|
|
||||||
});
|
|
||||||
core.setOutput('dotnet-version', versionToOutput);
|
|
||||||
const matchersPath = path_1.default.join(__dirname, '..', '.github');
|
const matchersPath = path_1.default.join(__dirname, '..', '.github');
|
||||||
core.info(`##[add-matcher]${path_1.default.join(matchersPath, 'csc.json')}`);
|
core.info(`##[add-matcher]${path_1.default.join(matchersPath, 'csc.json')}`);
|
||||||
}
|
}
|
||||||
@ -580,6 +597,25 @@ function getVersionFromGlobalJson(globalJsonPath) {
|
|||||||
}
|
}
|
||||||
return version;
|
return version;
|
||||||
}
|
}
|
||||||
|
function outputInstalledVersion(installedVersions, globalJsonFileInput) {
|
||||||
|
if (!installedVersions.length) {
|
||||||
|
core.info(`The 'dotnet-version' output will not be set.`);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (installedVersions.includes(null)) {
|
||||||
|
core.warning(`Failed to output the installed version of .NET. The 'dotnet-version' output will not be set.`);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (globalJsonFileInput) {
|
||||||
|
const versionToOutput = installedVersions.at(-1); // .NET SDK version parsed from the global.json file is installed last
|
||||||
|
core.setOutput('dotnet-version', versionToOutput);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
const versionToOutput = semver_1.default.maxSatisfying(installedVersions, '*', {
|
||||||
|
includePrerelease: true
|
||||||
|
});
|
||||||
|
core.setOutput('dotnet-version', versionToOutput);
|
||||||
|
}
|
||||||
run();
|
run();
|
||||||
|
|
||||||
|
|
||||||
@ -21084,14 +21120,6 @@ module.exports = require("fs");
|
|||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
/***/ 3292:
|
|
||||||
/***/ ((module) => {
|
|
||||||
|
|
||||||
"use strict";
|
|
||||||
module.exports = require("fs/promises");
|
|
||||||
|
|
||||||
/***/ }),
|
|
||||||
|
|
||||||
/***/ 3685:
|
/***/ 3685:
|
||||||
/***/ ((module) => {
|
/***/ ((module) => {
|
||||||
|
|
||||||
|
@ -61,12 +61,13 @@ Pull requests are the easiest way to contribute changes to git repos at GitHub.
|
|||||||
|
|
||||||
- To implement new features or fix bugs, you need to make changes to the `.ts` files, which are located in the `src` folder
|
- To implement new features or fix bugs, you need to make changes to the `.ts` files, which are located in the `src` folder
|
||||||
- To comply with the code style, **you need to run the `format` script**
|
- To comply with the code style, **you need to run the `format` script**
|
||||||
|
- To lint the code, **you need to run the `lint:fix` script**
|
||||||
- To transpile source code to `javascript` we use [NCC](https://github.com/vercel/ncc). **It is very important to run the `build` script after making changes**, otherwise your changes will not get into the final `javascript` build
|
- To transpile source code to `javascript` we use [NCC](https://github.com/vercel/ncc). **It is very important to run the `build` script after making changes**, otherwise your changes will not get into the final `javascript` build
|
||||||
|
|
||||||
**Learn more about how to implement tests:**
|
**Learn more about how to implement tests:**
|
||||||
|
|
||||||
Adding or changing tests is an integral part of making a change to the code.
|
Adding or changing tests is an integral part of making a change to the code.
|
||||||
Unit tests are in the `__tests__` folder, and end-to-end tests are in the `workflows` folder, particularly in the [workflow.yml](https://github.com/actions/setup-dotnet/blob/main/.github/workflows/workflow.yml).
|
Unit tests are in the `__tests__` folder, and end-to-end tests are in the `workflows` folder, particularly in the [e2e-tests.yml](https://github.com/actions/setup-dotnet/blob/main/.github/workflows/e2e-tests.yml).
|
||||||
|
|
||||||
- The contributor can add various types of tests (like unit tests or end-to-end tests), which, in his opinion, will be necessary and sufficient for testing new or changed functionality
|
- The contributor can add various types of tests (like unit tests or end-to-end tests), which, in his opinion, will be necessary and sufficient for testing new or changed functionality
|
||||||
- Tests should cover a successful execution, as well as some edge cases and possible errors
|
- Tests should cover a successful execution, as well as some edge cases and possible errors
|
||||||
|
459
externals/install-dotnet.ps1
vendored
459
externals/install-dotnet.ps1
vendored
@ -9,6 +9,12 @@
|
|||||||
.DESCRIPTION
|
.DESCRIPTION
|
||||||
Installs dotnet cli. If dotnet installation already exists in the given directory
|
Installs dotnet cli. If dotnet installation already exists in the given directory
|
||||||
it will update it only if the requested version differs from the one already installed.
|
it will update it only if the requested version differs from the one already installed.
|
||||||
|
|
||||||
|
Note that the intended use of this script is for Continuous Integration (CI) scenarios, where:
|
||||||
|
- The SDK needs to be installed without user interaction and without admin rights.
|
||||||
|
- The SDK installation doesn't need to persist across multiple CI runs.
|
||||||
|
To set up a development environment or to run apps, use installers rather than this script. Visit https://dotnet.microsoft.com/download to get the installer.
|
||||||
|
|
||||||
.PARAMETER Channel
|
.PARAMETER Channel
|
||||||
Default: LTS
|
Default: LTS
|
||||||
Download from the Channel specified. Possible values:
|
Download from the Channel specified. Possible values:
|
||||||
@ -164,6 +170,12 @@ function Say-Verbose($str) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function Measure-Action($name, $block) {
|
||||||
|
$time = Measure-Command $block
|
||||||
|
$totalSeconds = $time.TotalSeconds
|
||||||
|
Say-Verbose "⏱ Action '$name' took $totalSeconds seconds"
|
||||||
|
}
|
||||||
|
|
||||||
function Say-Invocation($Invocation) {
|
function Say-Invocation($Invocation) {
|
||||||
$command = $Invocation.MyCommand;
|
$command = $Invocation.MyCommand;
|
||||||
$args = (($Invocation.BoundParameters.Keys | foreach { "-$_ `"$($Invocation.BoundParameters[$_])`"" }) -join " ")
|
$args = (($Invocation.BoundParameters.Keys | foreach { "-$_ `"$($Invocation.BoundParameters[$_])`"" }) -join " ")
|
||||||
@ -1104,10 +1116,10 @@ function Prepare-Install-Directory {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Say "Note that the intended use of this script is for Continuous Integration (CI) scenarios, where:"
|
Say-Verbose "Note that the intended use of this script is for Continuous Integration (CI) scenarios, where:"
|
||||||
Say "- The SDK needs to be installed without user interaction and without admin rights."
|
Say-Verbose "- The SDK needs to be installed without user interaction and without admin rights."
|
||||||
Say "- The SDK installation doesn't need to persist across multiple CI runs."
|
Say-Verbose "- The SDK installation doesn't need to persist across multiple CI runs."
|
||||||
Say "To set up a development environment or to run apps, use installers rather than this script. Visit https://dotnet.microsoft.com/download to get the installer.`r`n"
|
Say-Verbose "To set up a development environment or to run apps, use installers rather than this script. Visit https://dotnet.microsoft.com/download to get the installer.`r`n"
|
||||||
|
|
||||||
if ($SharedRuntime -and (-not $Runtime)) {
|
if ($SharedRuntime -and (-not $Runtime)) {
|
||||||
$Runtime = "dotnet"
|
$Runtime = "dotnet"
|
||||||
@ -1115,14 +1127,16 @@ if ($SharedRuntime -and (-not $Runtime)) {
|
|||||||
|
|
||||||
$OverrideNonVersionedFiles = !$SkipNonVersionedFiles
|
$OverrideNonVersionedFiles = !$SkipNonVersionedFiles
|
||||||
|
|
||||||
$CLIArchitecture = Get-CLIArchitecture-From-Architecture $Architecture
|
Measure-Action "Product discovery" {
|
||||||
$NormalizedQuality = Get-NormalizedQuality $Quality
|
$script:CLIArchitecture = Get-CLIArchitecture-From-Architecture $Architecture
|
||||||
Say-Verbose "Normalized quality: '$NormalizedQuality'"
|
$script:NormalizedQuality = Get-NormalizedQuality $Quality
|
||||||
$NormalizedChannel = Get-NormalizedChannel $Channel
|
Say-Verbose "Normalized quality: '$NormalizedQuality'"
|
||||||
Say-Verbose "Normalized channel: '$NormalizedChannel'"
|
$script:NormalizedChannel = Get-NormalizedChannel $Channel
|
||||||
$NormalizedProduct = Get-NormalizedProduct $Runtime
|
Say-Verbose "Normalized channel: '$NormalizedChannel'"
|
||||||
Say-Verbose "Normalized product: '$NormalizedProduct'"
|
$script:NormalizedProduct = Get-NormalizedProduct $Runtime
|
||||||
$FeedCredential = ValidateFeedCredential $FeedCredential
|
Say-Verbose "Normalized product: '$NormalizedProduct'"
|
||||||
|
$script:FeedCredential = ValidateFeedCredential $FeedCredential
|
||||||
|
}
|
||||||
|
|
||||||
$InstallRoot = Resolve-Installation-Path $InstallDir
|
$InstallRoot = Resolve-Installation-Path $InstallDir
|
||||||
Say-Verbose "InstallRoot: $InstallRoot"
|
Say-Verbose "InstallRoot: $InstallRoot"
|
||||||
@ -1200,7 +1214,7 @@ if ($DryRun) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
Prepare-Install-Directory
|
Measure-Action "Installation directory preparation" { Prepare-Install-Directory }
|
||||||
|
|
||||||
$ZipPath = [System.IO.Path]::combine([System.IO.Path]::GetTempPath(), [System.IO.Path]::GetRandomFileName())
|
$ZipPath = [System.IO.Path]::combine([System.IO.Path]::GetTempPath(), [System.IO.Path]::GetRandomFileName())
|
||||||
Say-Verbose "Zip path: $ZipPath"
|
Say-Verbose "Zip path: $ZipPath"
|
||||||
@ -1214,7 +1228,7 @@ foreach ($link in $DownloadLinks)
|
|||||||
Say-Verbose "Downloading `"$($link.type)`" link $($link.downloadLink)"
|
Say-Verbose "Downloading `"$($link.type)`" link $($link.downloadLink)"
|
||||||
|
|
||||||
try {
|
try {
|
||||||
DownloadFile -Source $link.downloadLink -OutPath $ZipPath
|
Measure-Action "Package download" { DownloadFile -Source $link.downloadLink -OutPath $ZipPath }
|
||||||
Say-Verbose "Download succeeded."
|
Say-Verbose "Download succeeded."
|
||||||
$DownloadSucceeded = $true
|
$DownloadSucceeded = $true
|
||||||
$DownloadedLink = $link
|
$DownloadedLink = $link
|
||||||
@ -1251,7 +1265,7 @@ if (-not $DownloadSucceeded) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Say "Extracting the archive."
|
Say "Extracting the archive."
|
||||||
Extract-Dotnet-Package -ZipPath $ZipPath -OutPath $InstallRoot
|
Measure-Action "Package extraction" { Extract-Dotnet-Package -ZipPath $ZipPath -OutPath $InstallRoot }
|
||||||
|
|
||||||
# Check if the SDK version is installed; if not, fail the installation.
|
# Check if the SDK version is installed; if not, fail the installation.
|
||||||
$isAssetInstalled = $false
|
$isAssetInstalled = $false
|
||||||
@ -1277,225 +1291,224 @@ if (!$isAssetInstalled) {
|
|||||||
|
|
||||||
SafeRemoveFile -Path $ZipPath
|
SafeRemoveFile -Path $ZipPath
|
||||||
|
|
||||||
Prepend-Sdk-InstallRoot-To-Path -InstallRoot $InstallRoot
|
Measure-Action "Setting up shell environment" { Prepend-Sdk-InstallRoot-To-Path -InstallRoot $InstallRoot }
|
||||||
|
|
||||||
Say "Note that the script does not resolve dependencies during installation."
|
Say "Note that the script does not resolve dependencies during installation."
|
||||||
Say "To check the list of dependencies, go to https://learn.microsoft.com/dotnet/core/install/windows#dependencies"
|
Say "To check the list of dependencies, go to https://learn.microsoft.com/dotnet/core/install/windows#dependencies"
|
||||||
Say "Installed version is $($DownloadedLink.effectiveVersion)"
|
Say "Installed version is $($DownloadedLink.effectiveVersion)"
|
||||||
Say "Installation finished"
|
Say "Installation finished"
|
||||||
|
|
||||||
# SIG # Begin signature block
|
# SIG # Begin signature block
|
||||||
# MIInzgYJKoZIhvcNAQcCoIInvzCCJ7sCAQExDzANBglghkgBZQMEAgEFADB5Bgor
|
# MIInvwYJKoZIhvcNAQcCoIInsDCCJ6wCAQExDzANBglghkgBZQMEAgEFADB5Bgor
|
||||||
# BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG
|
# BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG
|
||||||
# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCB7pzZ0nuEMd30h
|
# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCBhfTi3SRn7+vyy
|
||||||
# n1EcAYUQN+1clltqaLf9611TDrw/laCCDYUwggYDMIID66ADAgECAhMzAAACzfNk
|
# uCXKPjhiawegWZ493EcaOEycbgkZcKCCDXYwggX0MIID3KADAgECAhMzAAACy7d1
|
||||||
# v/jUTF1RAAAAAALNMA0GCSqGSIb3DQEBCwUAMH4xCzAJBgNVBAYTAlVTMRMwEQYD
|
# OfsCcUI2AAAAAALLMA0GCSqGSIb3DQEBCwUAMH4xCzAJBgNVBAYTAlVTMRMw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SZWRtb25kMR4wHAYDVQQKExVN
|
||||||
|
# aWNyb3NvZnQgQ29ycG9yYXRpb24xKDAmBgNVBAMTH01pY3Jvc29mdCBDb2RlIFNp
|
||||||
|
# Z25pbmcgUENBIDIwMTECEzMAAALLt3U5+wJxQjYAAAAAAsswDQYJYIZIAWUDBAIB
|
||||||
|
# BQCgga4wGQYJKoZIhvcNAQkDMQwGCisGAQQBgjcCAQQwHAYKKwYBBAGCNwIBCzEO
|
||||||
|
# MAwGCisGAQQBgjcCARUwLwYJKoZIhvcNAQkEMSIEIFmuaTXYQ37AFvsEol24fdW+
|
||||||
|
# nRqHcc1fr+VQVdqhXc/vMEIGCisGAQQBgjcCAQwxNDAyoBSAEgBNAGkAYwByAG8A
|
||||||
|
# cwBvAGYAdKEagBhodHRwOi8vd3d3Lm1pY3Jvc29mdC5jb20wDQYJKoZIhvcNAQEB
|
||||||
|
# BQAEggEAjY5XW5Ly7TJ1OTbeIR98xU+2dmtw7L71ws+ICnQCGhj2xJDUK+5yrTfO
|
||||||
|
# 8C98l/P4ynFi33Dl8z2YElqUCuqEXbiCzz06lIL4NuibC5DV/X80ZmICR/NYd2v1
|
||||||
|
# ww7IH+7dpsHAowBBindCYpVwQ3Ea3kDWgsjPAinAysFFushSOnNWFvrF6vi2smrs
|
||||||
|
# smbrAAhEhSfLd1Pxxdw73hQ0YjM/D3F3opaybMQ0blpHhOaqtbiyYzvk0doIzBEc
|
||||||
|
# trSH4NDIc3yLNj5VbjSczpexE+hyQNY4xCtwco4bVtXhONUihv08AIKR8+sIaI7A
|
||||||
|
# mM/SWrrwGYSSSxydKqDei7biKG4jDqGCFykwghclBgorBgEEAYI3AwMBMYIXFTCC
|
||||||
|
# FxEGCSqGSIb3DQEHAqCCFwIwghb+AgEDMQ8wDQYJYIZIAWUDBAIBBQAwggFZBgsq
|
||||||
|
# hkiG9w0BCRABBKCCAUgEggFEMIIBQAIBAQYKKwYBBAGEWQoDATAxMA0GCWCGSAFl
|
||||||
|
# AwQ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dJaAZx7Unfka/I
|
|
||||||
# D4Wbw5edh/SR7TTptzRqMA0GCSqGSIb3DQEBCwUABIICAA1QlR3ywR7e+jqZ++NC
|
|
||||||
# xsIwREiwVS70CEkbH8XpPRS0mFS0SHcCfpwymGfdep3D0CWk0PIfMhXq0SD97iBI
|
|
||||||
# rOLdHglVBkMYTjGEBHyBzv/LevAZUuzoc5aqyIF4Ywa5KS4PGbMSuRK5CKAojOzH
|
|
||||||
# A/vp2/KYuADmf9kOOgOfDVicyfoqZ+3W+QaUI/k0KKV4dPLF55+y18C+Td6sR60Y
|
|
||||||
# AkcvGZObuj/OkREhdTJ1qJ2E/4RKG8gtGY1DfluLon7+UvS/ciWDWrJnHMmkxM11
|
|
||||||
# cYuRIvLArIdq/YS2bcSnY6AVO2zYjj7gCqDN9GuCurstUKC5uxVl3VNxntC0u3Le
|
|
||||||
# BoI/R5uMYlTXodW8ukLNL6zHrQ4wI4udgW77KJref+3E1PEpZBRMxwose7Vt8lDc
|
|
||||||
# sW1vdM+eZzUXRLhDR8a0Nai7+PaNoukoGf4pvwsu8Mkeji5a0hWtU9lUVRv6nzue
|
|
||||||
# 3L2olhsbiHhAET7N6Rj0kzEhbUgfVUJrGvNlWOfN7MDr+OpArGXMPLtovbKTLtXF
|
|
||||||
# v/GrJo9wQuyqUmY6KQSRDZgOw1CcoZpJcy40HG/aOlJwk03N13OZD5H3KfHwEphR
|
|
||||||
# YnbGwGq9zUId5druSr5s40Yyl3idAkqmI5SXAm9v/gRq2X9vMU0a7KqXet9wO62F
|
|
||||||
# TqxV+7Qp48Vw6hW1g+Q7oWoc
|
|
||||||
# SIG # End signature block
|
# SIG # End signature block
|
||||||
|
12
externals/install-dotnet.sh
vendored
12
externals/install-dotnet.sh
vendored
@ -1617,6 +1617,10 @@ do
|
|||||||
echo " $script_name -h|-?|--help"
|
echo " $script_name -h|-?|--help"
|
||||||
echo ""
|
echo ""
|
||||||
echo "$script_name is a simple command line interface for obtaining dotnet cli."
|
echo "$script_name is a simple command line interface for obtaining dotnet cli."
|
||||||
|
echo " Note that the intended use of this script is for Continuous Integration (CI) scenarios, where:"
|
||||||
|
echo " - The SDK needs to be installed without user interaction and without admin rights."
|
||||||
|
echo " - The SDK installation doesn't need to persist across multiple CI runs."
|
||||||
|
echo " To set up a development environment or to run apps, use installers rather than this script. Visit https://dotnet.microsoft.com/download to get the installer."
|
||||||
echo ""
|
echo ""
|
||||||
echo "Options:"
|
echo "Options:"
|
||||||
echo " -c,--channel <CHANNEL> Download from the channel specified, Defaults to \`$channel\`."
|
echo " -c,--channel <CHANNEL> Download from the channel specified, Defaults to \`$channel\`."
|
||||||
@ -1694,10 +1698,10 @@ do
|
|||||||
shift
|
shift
|
||||||
done
|
done
|
||||||
|
|
||||||
say "Note that the intended use of this script is for Continuous Integration (CI) scenarios, where:"
|
say_verbose "Note that the intended use of this script is for Continuous Integration (CI) scenarios, where:"
|
||||||
say "- The SDK needs to be installed without user interaction and without admin rights."
|
say_verbose "- The SDK needs to be installed without user interaction and without admin rights."
|
||||||
say "- The SDK installation doesn't need to persist across multiple CI runs."
|
say_verbose "- The SDK installation doesn't need to persist across multiple CI runs."
|
||||||
say "To set up a development environment or to run apps, use installers rather than this script. Visit https://dotnet.microsoft.com/download to get the installer.\n"
|
say_verbose "To set up a development environment or to run apps, use installers rather than this script. Visit https://dotnet.microsoft.com/download to get the installer.\n"
|
||||||
|
|
||||||
if [ "$internal" = true ] && [ -z "$(echo $feed_credential)" ]; then
|
if [ "$internal" = true ] && [ -z "$(echo $feed_credential)" ]; then
|
||||||
message="Provide credentials via --feed-credential parameter."
|
message="Provide credentials via --feed-credential parameter."
|
||||||
|
2159
package-lock.json
generated
2159
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
14
package.json
14
package.json
@ -6,9 +6,10 @@
|
|||||||
"main": "lib/setup-dotnet.js",
|
"main": "lib/setup-dotnet.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "tsc && ncc build",
|
"build": "tsc && ncc build",
|
||||||
"format": "prettier --write **/*.ts",
|
"format": "prettier --no-error-on-unmatched-pattern --config ./.prettierrc.js --write \"**/*.{ts,yml,yaml}\"",
|
||||||
"format-check": "prettier --check **/*.ts",
|
"format-check": "prettier --no-error-on-unmatched-pattern --config ./.prettierrc.js --check \"**/*.{ts,yml,yaml}\"",
|
||||||
"lint": "echo \"Fake command that does nothing. It is used in reusable workflows\"",
|
"lint": "eslint --config ./.eslintrc.js \"**/*.ts\"",
|
||||||
|
"lint:fix": "eslint --config ./.eslintrc.js \"**/*.ts\" --fix",
|
||||||
"prepare": "husky install",
|
"prepare": "husky install",
|
||||||
"test": "jest --coverage --config ./jest.config.js",
|
"test": "jest --coverage --config ./jest.config.js",
|
||||||
"update-installers": "nwget https://dot.net/v1/dotnet-install.ps1 -O externals/install-dotnet.ps1 && nwget https://dot.net/v1/dotnet-install.sh -O externals/install-dotnet.sh"
|
"update-installers": "nwget https://dot.net/v1/dotnet-install.ps1 -O externals/install-dotnet.ps1 && nwget https://dot.net/v1/dotnet-install.sh -O externals/install-dotnet.sh"
|
||||||
@ -37,11 +38,16 @@
|
|||||||
"@types/jest": "^27.0.2",
|
"@types/jest": "^27.0.2",
|
||||||
"@types/node": "^16.11.25",
|
"@types/node": "^16.11.25",
|
||||||
"@types/semver": "^6.2.2",
|
"@types/semver": "^6.2.2",
|
||||||
|
"@typescript-eslint/eslint-plugin": "^5.54.0",
|
||||||
|
"@typescript-eslint/parser": "^5.54.0",
|
||||||
"@vercel/ncc": "^0.33.4",
|
"@vercel/ncc": "^0.33.4",
|
||||||
|
"eslint": "^8.35.0",
|
||||||
|
"eslint-config-prettier": "^8.6.0",
|
||||||
|
"eslint-plugin-jest": "^27.2.1",
|
||||||
"husky": "^8.0.1",
|
"husky": "^8.0.1",
|
||||||
"jest": "^27.2.5",
|
"jest": "^27.2.5",
|
||||||
"jest-circus": "^27.2.5",
|
"jest-circus": "^27.2.5",
|
||||||
"prettier": "^2.7.1",
|
"prettier": "^2.8.4",
|
||||||
"ts-jest": "^27.0.5",
|
"ts-jest": "^27.0.5",
|
||||||
"typescript": "^4.8.4",
|
"typescript": "^4.8.4",
|
||||||
"wget-improved": "^3.2.1"
|
"wget-improved": "^3.2.1"
|
||||||
|
@ -6,7 +6,7 @@ import {XMLParser, XMLBuilder} from 'fast-xml-parser';
|
|||||||
|
|
||||||
export function configAuthentication(
|
export function configAuthentication(
|
||||||
feedUrl: string,
|
feedUrl: string,
|
||||||
existingFileLocation: string = '',
|
existingFileLocation = '',
|
||||||
processRoot: string = process.cwd()
|
processRoot: string = process.cwd()
|
||||||
) {
|
) {
|
||||||
const existingNuGetConfig: string = path.resolve(
|
const existingNuGetConfig: string = path.resolve(
|
||||||
@ -26,7 +26,7 @@ export function configAuthentication(
|
|||||||
}
|
}
|
||||||
|
|
||||||
function isValidKey(key: string): boolean {
|
function isValidKey(key: string): boolean {
|
||||||
return /^[\w\-\.]+$/i.test(key);
|
return /^[\w\-.]+$/i.test(key);
|
||||||
}
|
}
|
||||||
|
|
||||||
function getExistingNugetConfig(processRoot: string) {
|
function getExistingNugetConfig(processRoot: string) {
|
||||||
@ -48,9 +48,9 @@ function writeFeedToFile(
|
|||||||
core.info(
|
core.info(
|
||||||
`dotnet-auth: Finding any source references in ${existingFileLocation}, writing a new temporary configuration file with credentials to ${tempFileLocation}`
|
`dotnet-auth: Finding any source references in ${existingFileLocation}, writing a new temporary configuration file with credentials to ${tempFileLocation}`
|
||||||
);
|
);
|
||||||
let sourceKeys: string[] = [];
|
const sourceKeys: string[] = [];
|
||||||
let owner: string = core.getInput('owner');
|
let owner: string = core.getInput('owner');
|
||||||
let sourceUrl: string = feedUrl;
|
const sourceUrl: string = feedUrl;
|
||||||
if (!owner) {
|
if (!owner) {
|
||||||
owner = github.context.repo.owner;
|
owner = github.context.repo.owner;
|
||||||
}
|
}
|
||||||
@ -130,7 +130,7 @@ function writeFeedToFile(
|
|||||||
];
|
];
|
||||||
|
|
||||||
if (!sourceKeys.length) {
|
if (!sourceKeys.length) {
|
||||||
let keystring = 'Source';
|
const keystring = 'Source';
|
||||||
|
|
||||||
xmlSource[1].configuration.push({
|
xmlSource[1].configuration.push({
|
||||||
packageSources: [
|
packageSources: [
|
||||||
|
129
src/installer.ts
129
src/installer.ts
@ -4,7 +4,6 @@ import * as exec from '@actions/exec';
|
|||||||
import * as io from '@actions/io';
|
import * as io from '@actions/io';
|
||||||
import * as hc from '@actions/http-client';
|
import * as hc from '@actions/http-client';
|
||||||
import {chmodSync} from 'fs';
|
import {chmodSync} from 'fs';
|
||||||
import {readdir} from 'fs/promises';
|
|
||||||
import path from 'path';
|
import path from 'path';
|
||||||
import os from 'os';
|
import os from 'os';
|
||||||
import semver from 'semver';
|
import semver from 'semver';
|
||||||
@ -17,6 +16,8 @@ export interface DotnetVersion {
|
|||||||
qualityFlag: boolean;
|
qualityFlag: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const QUALITY_INPUT_MINIMAL_MAJOR_TAG = 6;
|
||||||
|
const LATEST_PATCH_SYNTAX_MINIMAL_MAJOR_TAG = 5;
|
||||||
export class DotnetVersionResolver {
|
export class DotnetVersionResolver {
|
||||||
private inputVersion: string;
|
private inputVersion: string;
|
||||||
private resolvedArgument: DotnetVersion;
|
private resolvedArgument: DotnetVersion;
|
||||||
@ -27,33 +28,15 @@ export class DotnetVersionResolver {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private async resolveVersionInput(): Promise<void> {
|
private async resolveVersionInput(): Promise<void> {
|
||||||
if (!semver.validRange(this.inputVersion)) {
|
if (!semver.validRange(this.inputVersion) && !this.isLatestPatchSyntax()) {
|
||||||
throw new Error(
|
throw new Error(
|
||||||
`'dotnet-version' was supplied in invalid format: ${this.inputVersion}! Supported syntax: A.B.C, A.B, A.B.x, A, A.x`
|
`The 'dotnet-version' was supplied in invalid format: ${this.inputVersion}! Supported syntax: A.B.C, A.B, A.B.x, A, A.x, A.B.Cxx`
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
if (semver.valid(this.inputVersion)) {
|
if (semver.valid(this.inputVersion)) {
|
||||||
this.resolvedArgument.type = 'version';
|
this.createVersionArgument();
|
||||||
this.resolvedArgument.value = this.inputVersion;
|
|
||||||
} else {
|
} else {
|
||||||
const [major, minor] = this.inputVersion.split('.');
|
await this.createChannelArgument();
|
||||||
|
|
||||||
if (this.isNumericTag(major)) {
|
|
||||||
this.resolvedArgument.type = 'channel';
|
|
||||||
if (this.isNumericTag(minor)) {
|
|
||||||
this.resolvedArgument.value = `${major}.${minor}`;
|
|
||||||
} else {
|
|
||||||
const httpClient = new hc.HttpClient('actions/setup-dotnet', [], {
|
|
||||||
allowRetries: true,
|
|
||||||
maxRetries: 3
|
|
||||||
});
|
|
||||||
this.resolvedArgument.value = await this.getLatestVersion(
|
|
||||||
httpClient,
|
|
||||||
[major, minor]
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
this.resolvedArgument.qualityFlag = +major >= 6 ? true : false;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -61,11 +44,44 @@ export class DotnetVersionResolver {
|
|||||||
return /^\d+$/.test(versionTag);
|
return /^\d+$/.test(versionTag);
|
||||||
}
|
}
|
||||||
|
|
||||||
public async createDotNetVersion(): Promise<{
|
private isLatestPatchSyntax() {
|
||||||
type: string;
|
const majorTag = this.inputVersion.match(
|
||||||
value: string;
|
/^(?<majorTag>\d+)\.\d+\.\d{1}x{2}$/
|
||||||
qualityFlag: boolean;
|
)?.groups?.majorTag;
|
||||||
}> {
|
if (
|
||||||
|
majorTag &&
|
||||||
|
parseInt(majorTag) < LATEST_PATCH_SYNTAX_MINIMAL_MAJOR_TAG
|
||||||
|
) {
|
||||||
|
throw new Error(
|
||||||
|
`The 'dotnet-version' was supplied in invalid format: ${this.inputVersion}! The A.B.Cxx syntax is available since the .NET 5.0 release.`
|
||||||
|
);
|
||||||
|
}
|
||||||
|
return majorTag ? true : false;
|
||||||
|
}
|
||||||
|
|
||||||
|
private createVersionArgument() {
|
||||||
|
this.resolvedArgument.type = 'version';
|
||||||
|
this.resolvedArgument.value = this.inputVersion;
|
||||||
|
}
|
||||||
|
|
||||||
|
private async createChannelArgument() {
|
||||||
|
this.resolvedArgument.type = 'channel';
|
||||||
|
const [major, minor] = this.inputVersion.split('.');
|
||||||
|
if (this.isLatestPatchSyntax()) {
|
||||||
|
this.resolvedArgument.value = this.inputVersion;
|
||||||
|
} else if (this.isNumericTag(major) && this.isNumericTag(minor)) {
|
||||||
|
this.resolvedArgument.value = `${major}.${minor}`;
|
||||||
|
} else if (this.isNumericTag(major)) {
|
||||||
|
this.resolvedArgument.value = await this.getLatestByMajorTag(major);
|
||||||
|
} else {
|
||||||
|
// If "dotnet-version" is specified as *, x or X resolve latest version of .NET explicitly from LTS channel. The version argument will default to "latest" by install-dotnet script.
|
||||||
|
this.resolvedArgument.value = 'LTS';
|
||||||
|
}
|
||||||
|
this.resolvedArgument.qualityFlag =
|
||||||
|
parseInt(major) >= QUALITY_INPUT_MINIMAL_MAJOR_TAG ? true : false;
|
||||||
|
}
|
||||||
|
|
||||||
|
public async createDotNetVersion(): Promise<DotnetVersion> {
|
||||||
await this.resolveVersionInput();
|
await this.resolveVersionInput();
|
||||||
if (!this.resolvedArgument.type) {
|
if (!this.resolvedArgument.type) {
|
||||||
return this.resolvedArgument;
|
return this.resolvedArgument;
|
||||||
@ -80,33 +96,32 @@ export class DotnetVersionResolver {
|
|||||||
return this.resolvedArgument;
|
return this.resolvedArgument;
|
||||||
}
|
}
|
||||||
|
|
||||||
private async getLatestVersion(
|
private async getLatestByMajorTag(majorTag: string): Promise<string> {
|
||||||
httpClient: hc.HttpClient,
|
const httpClient = new hc.HttpClient('actions/setup-dotnet', [], {
|
||||||
versionParts: string[]
|
allowRetries: true,
|
||||||
): Promise<string> {
|
maxRetries: 3
|
||||||
|
});
|
||||||
const response = await httpClient.getJson<any>(
|
const response = await httpClient.getJson<any>(
|
||||||
DotnetVersionResolver.DotNetCoreIndexUrl
|
DotnetVersionResolver.DotNetCoreIndexUrl
|
||||||
);
|
);
|
||||||
const result = response.result || {};
|
const result = response.result || {};
|
||||||
let releasesInfo: any[] = result['releases-index'];
|
const releasesInfo: any[] = result['releases-index'];
|
||||||
|
|
||||||
let releaseInfo = releasesInfo.find(info => {
|
const releaseInfo = releasesInfo.find(info => {
|
||||||
let sdkParts: string[] = info['channel-version'].split('.');
|
const sdkParts: string[] = info['channel-version'].split('.');
|
||||||
return sdkParts[0] === versionParts[0];
|
return sdkParts[0] === majorTag;
|
||||||
});
|
});
|
||||||
|
|
||||||
if (!releaseInfo) {
|
if (!releaseInfo) {
|
||||||
throw new Error(
|
throw new Error(
|
||||||
`Could not find info for version ${versionParts.join('.')} at ${
|
`Could not find info for version with major tag: "${majorTag}" at ${DotnetVersionResolver.DotNetCoreIndexUrl}`
|
||||||
DotnetVersionResolver.DotNetCoreIndexUrl
|
|
||||||
}`
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
return releaseInfo['channel-version'];
|
return releaseInfo['channel-version'];
|
||||||
}
|
}
|
||||||
|
|
||||||
static DotNetCoreIndexUrl: string =
|
static DotNetCoreIndexUrl =
|
||||||
'https://dotnetcli.azureedge.net/dotnet/release-metadata/releases-index.json';
|
'https://dotnetcli.azureedge.net/dotnet/release-metadata/releases-index.json';
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -171,12 +186,12 @@ export class DotnetCoreInstaller {
|
|||||||
scriptArguments.push(option, this.quality);
|
scriptArguments.push(option, this.quality);
|
||||||
} else {
|
} else {
|
||||||
core.warning(
|
core.warning(
|
||||||
`'dotnet-quality' input can be used only with .NET SDK version in A.B, A.B.x, A and A.x formats where the major tag is higher than 5. You specified: ${this.version}. 'dotnet-quality' input is ignored.`
|
`The 'dotnet-quality' input can be used only with .NET SDK version in A.B, A.B.x, A, A.x and A.B.Cxx formats where the major tag is higher than 5. You specified: ${this.version}. 'dotnet-quality' input is ignored.`
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public async installDotnet(): Promise<string> {
|
public async installDotnet(): Promise<string | null> {
|
||||||
const windowsDefaultOptions = [
|
const windowsDefaultOptions = [
|
||||||
'-NoLogo',
|
'-NoLogo',
|
||||||
'-Sta',
|
'-Sta',
|
||||||
@ -236,28 +251,28 @@ export class DotnetCoreInstaller {
|
|||||||
ignoreReturnCode: true,
|
ignoreReturnCode: true,
|
||||||
env: process.env as {string: string}
|
env: process.env as {string: string}
|
||||||
};
|
};
|
||||||
const {exitCode, stdout} = await exec.getExecOutput(
|
const {exitCode, stdout, stderr} = await exec.getExecOutput(
|
||||||
`"${scriptPath}"`,
|
`"${scriptPath}"`,
|
||||||
scriptArguments,
|
scriptArguments,
|
||||||
getExecOutputOptions
|
getExecOutputOptions
|
||||||
);
|
);
|
||||||
if (exitCode) {
|
if (exitCode) {
|
||||||
throw new Error(`Failed to install dotnet ${exitCode}. ${stdout}`);
|
throw new Error(
|
||||||
}
|
`Failed to install dotnet, exit code: ${exitCode}. ${stderr}`
|
||||||
|
|
||||||
return this.outputDotnetVersion(dotnetVersion.value);
|
|
||||||
}
|
|
||||||
|
|
||||||
private async outputDotnetVersion(version): Promise<string> {
|
|
||||||
const installationPath = process.env['DOTNET_INSTALL_DIR']!;
|
|
||||||
let versionsOnRunner: string[] = await readdir(
|
|
||||||
path.join(installationPath.replace(/'/g, ''), 'sdk')
|
|
||||||
);
|
);
|
||||||
|
}
|
||||||
|
|
||||||
let installedVersion = semver.maxSatisfying(versionsOnRunner, version, {
|
return this.parseInstalledVersion(stdout);
|
||||||
includePrerelease: true
|
}
|
||||||
})!;
|
|
||||||
|
|
||||||
return installedVersion;
|
private parseInstalledVersion(stdout: string): string | null {
|
||||||
|
const regex = /(?<version>\d+\.\d+\.\d+[a-z0-9._-]*)/gm;
|
||||||
|
const matchedResult = regex.exec(stdout);
|
||||||
|
|
||||||
|
if (!matchedResult) {
|
||||||
|
core.warning(`Failed to parse installed by the script version of .NET`);
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
return matchedResult.groups!.version;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -13,7 +13,7 @@ const qualityOptions = [
|
|||||||
'ga'
|
'ga'
|
||||||
] as const;
|
] as const;
|
||||||
|
|
||||||
export type QualityOptions = typeof qualityOptions[number];
|
export type QualityOptions = (typeof qualityOptions)[number];
|
||||||
|
|
||||||
export async function run() {
|
export async function run() {
|
||||||
try {
|
try {
|
||||||
@ -27,11 +27,11 @@ export async function run() {
|
|||||||
// Proxy, auth, (etc) are still set up, even if no version is identified
|
// Proxy, auth, (etc) are still set up, even if no version is identified
|
||||||
//
|
//
|
||||||
const versions = core.getMultilineInput('dotnet-version');
|
const versions = core.getMultilineInput('dotnet-version');
|
||||||
const installedDotnetVersions: string[] = [];
|
const installedDotnetVersions: (string | null)[] = [];
|
||||||
|
|
||||||
const globalJsonFileInput = core.getInput('global-json-file');
|
const globalJsonFileInput = core.getInput('global-json-file');
|
||||||
if (globalJsonFileInput) {
|
if (globalJsonFileInput) {
|
||||||
const globalJsonPath = path.join(process.cwd(), globalJsonFileInput);
|
const globalJsonPath = path.resolve(process.cwd(), globalJsonFileInput);
|
||||||
if (!fs.existsSync(globalJsonPath)) {
|
if (!fs.existsSync(globalJsonPath)) {
|
||||||
throw new Error(
|
throw new Error(
|
||||||
`The specified global.json file '${globalJsonFileInput}' does not exist`
|
`The specified global.json file '${globalJsonFileInput}' does not exist`
|
||||||
@ -48,7 +48,7 @@ export async function run() {
|
|||||||
versions.push(getVersionFromGlobalJson(globalJsonPath));
|
versions.push(getVersionFromGlobalJson(globalJsonPath));
|
||||||
} else {
|
} else {
|
||||||
core.info(
|
core.info(
|
||||||
`global.json wasn't found in the root directory. No .NET version will be installed.`
|
`The global.json wasn't found in the root directory. No .NET version will be installed.`
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -58,7 +58,7 @@ export async function run() {
|
|||||||
|
|
||||||
if (quality && !qualityOptions.includes(quality)) {
|
if (quality && !qualityOptions.includes(quality)) {
|
||||||
throw new Error(
|
throw new Error(
|
||||||
`${quality} is not a supported value for 'dotnet-quality' option. Supported values are: daily, signed, validated, preview, ga.`
|
`Value '${quality}' is not supported for the 'dotnet-quality' option. Supported values are: daily, signed, validated, preview, ga.`
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -78,19 +78,7 @@ export async function run() {
|
|||||||
auth.configAuthentication(sourceUrl, configFile);
|
auth.configAuthentication(sourceUrl, configFile);
|
||||||
}
|
}
|
||||||
|
|
||||||
const comparisonRange: string = globalJsonFileInput
|
outputInstalledVersion(installedDotnetVersions, globalJsonFileInput);
|
||||||
? versions[versions.length - 1]!
|
|
||||||
: '*';
|
|
||||||
|
|
||||||
const versionToOutput = semver.maxSatisfying(
|
|
||||||
installedDotnetVersions,
|
|
||||||
comparisonRange,
|
|
||||||
{
|
|
||||||
includePrerelease: true
|
|
||||||
}
|
|
||||||
);
|
|
||||||
|
|
||||||
core.setOutput('dotnet-version', versionToOutput);
|
|
||||||
|
|
||||||
const matchersPath = path.join(__dirname, '..', '.github');
|
const matchersPath = path.join(__dirname, '..', '.github');
|
||||||
core.info(`##[add-matcher]${path.join(matchersPath, 'csc.json')}`);
|
core.info(`##[add-matcher]${path.join(matchersPath, 'csc.json')}`);
|
||||||
@ -100,7 +88,7 @@ export async function run() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function getVersionFromGlobalJson(globalJsonPath: string): string {
|
function getVersionFromGlobalJson(globalJsonPath: string): string {
|
||||||
let version: string = '';
|
let version = '';
|
||||||
const globalJson = JSON.parse(
|
const globalJson = JSON.parse(
|
||||||
// .trim() is necessary to strip BOM https://github.com/nodejs/node/issues/20649
|
// .trim() is necessary to strip BOM https://github.com/nodejs/node/issues/20649
|
||||||
fs.readFileSync(globalJsonPath, {encoding: 'utf8'}).trim()
|
fs.readFileSync(globalJsonPath, {encoding: 'utf8'}).trim()
|
||||||
@ -116,4 +104,37 @@ function getVersionFromGlobalJson(globalJsonPath: string): string {
|
|||||||
return version;
|
return version;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function outputInstalledVersion(
|
||||||
|
installedVersions: (string | null)[],
|
||||||
|
globalJsonFileInput: string
|
||||||
|
): void {
|
||||||
|
if (!installedVersions.length) {
|
||||||
|
core.info(`The 'dotnet-version' output will not be set.`);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (installedVersions.includes(null)) {
|
||||||
|
core.warning(
|
||||||
|
`Failed to output the installed version of .NET. The 'dotnet-version' output will not be set.`
|
||||||
|
);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (globalJsonFileInput) {
|
||||||
|
const versionToOutput = installedVersions.at(-1); // .NET SDK version parsed from the global.json file is installed last
|
||||||
|
core.setOutput('dotnet-version', versionToOutput);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
const versionToOutput = semver.maxSatisfying(
|
||||||
|
installedVersions as string[],
|
||||||
|
'*',
|
||||||
|
{
|
||||||
|
includePrerelease: true
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
core.setOutput('dotnet-version', versionToOutput);
|
||||||
|
}
|
||||||
|
|
||||||
run();
|
run();
|
||||||
|
@ -49,7 +49,8 @@
|
|||||||
// "typeRoots": [], /* List of folders to include type definitions from. */
|
// "typeRoots": [], /* List of folders to include type definitions from. */
|
||||||
// "types": [], /* Type declaration files to be included in compilation. */
|
// "types": [], /* Type declaration files to be included in compilation. */
|
||||||
// "allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */
|
// "allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */
|
||||||
"esModuleInterop": true /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */
|
"esModuleInterop": true, /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */
|
||||||
|
"resolveJsonModule": true, /* Allows importing modules with a '.json' extension, which is a common practice in node projects. */
|
||||||
// "preserveSymlinks": true, /* Do not resolve the real path of symlinks. */
|
// "preserveSymlinks": true, /* Do not resolve the real path of symlinks. */
|
||||||
// "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */
|
// "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user