Compare commits

...

19 Commits

Author SHA1 Message Date
priya-kinthali
baa11fbfe1 Bump test dependencies to resolve System.Net.Http vulnerability, update workflows and README (#692)
* update test deps, workflows, and docs for latest versions

* fix wording

* update versions
2026-01-13 17:07:38 -06:00
Salman Chishti
24ec4f204b Upgrade to latest actions packages (#687)
* Add license metadata for various npm dependencies

* fix: correct license type for @actions/http-client to mit

* chore: update dependencies and version in package.json

- Bump version from 5.0.0 to 5.0.1
- Upgrade @actions/cache from ^4.0.3 to ^5.0.0
- Upgrade @actions/core from ^1.10.0 to ^2.0.0
- Upgrade @actions/exec from ^1.1.1 to ^2.0.0
- Upgrade @actions/http-client from ^2.2.3 to ^3.0.0

Add license files for @actions/http-client versions 2.2.3 and 3.0.0

* dist updates

* upgrade cache to 5.0.1

* check failure fix

---------

Co-authored-by: Aparna Jyothi <aparnajyothi-y@github.com>
2026-01-13 14:14:30 -06:00
Benjamin Krämer
4c100cb5e4 Fix icons (#604) 2026-01-13 14:09:59 -06:00
dependabot[bot]
25328d894d Bump actions/checkout from 5 to 6 (#684)
Bumps [actions/checkout](https://github.com/actions/checkout) from 5 to 6.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v5...v6)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-12-29 15:18:38 -06:00
priya-kinthali
937b8dd381 Update README with note on setting DOTNET_INSTALL_DIR for Linux permission issues (#689)
* update README: setting DOTNET_INSTALL_DIR

* fix indentation
2025-12-22 12:03:09 -06:00
dependabot[bot]
2016bd2012 Bump actions/publish-action from 0.3.0 to 0.4.0 and update macos-13 to macos-15-intel (#665)
* Bump actions/publish-action from 0.3.0 to 0.4.0

Bumps [actions/publish-action](https://github.com/actions/publish-action) from 0.3.0 to 0.4.0.
- [Commits](https://github.com/actions/publish-action/compare/v0.3.0...v0.4.0)

---
updated-dependencies:
- dependency-name: actions/publish-action
  dependency-version: 0.4.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* Bump actions/publish-action from 0.3.0 to 0.4.0

Bumps [actions/publish-action](https://github.com/actions/publish-action) from 0.3.0 to 0.4.0.
- [Commits](https://github.com/actions/publish-action/compare/v0.3.0...v0.4.0)

---
updated-dependencies:
- dependency-name: actions/publish-action
  dependency-version: 0.4.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* Installer script updates

* Update macos-13 to macos-15-intel

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: HarithaVattikuti <73516759+HarithaVattikuti@users.noreply.github.com>
Co-authored-by: Aparna Jyothi <aparnajyothi-y@github.com>
2025-11-24 11:04:21 -06:00
dependabot[bot]
21e81f65dd Bump eslint-plugin-jest from 27.9.0 to 29.0.1 (#648)
* Bump eslint-plugin-jest from 27.9.0 to 29.0.1

---
updated-dependencies:
- dependency-name: eslint-plugin-jest
  dependency-version: 29.0.1
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* check failure fix

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Aparna Jyothi <aparnajyothi-y@github.com>
2025-10-14 14:30:19 -05:00
dependabot[bot]
740310365d Bump typescript from 5.4.2 to 5.9.2 (#624)
* Bump typescript from 5.4.2 to 5.8.3

Bumps [typescript](https://github.com/microsoft/TypeScript) from 5.4.2 to 5.8.3.
- [Release notes](https://github.com/microsoft/TypeScript/releases)
- [Changelog](https://github.com/microsoft/TypeScript/blob/main/azure-pipelines.release-publish.yml)
- [Commits](https://github.com/microsoft/TypeScript/commits)

---
updated-dependencies:
- dependency-name: typescript
  dependency-version: 5.8.3
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* doc update

* doc update

* doc format update

* update

* update

* doc update

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Aparna Jyothi <aparnajyothi-y@github.com>
2025-09-08 22:03:08 -05:00
Salman Chishti
d4c94342e5 Update to Node.js 24 and modernize async usage (#654)
* Update to Node.js 24 and modernize async usage

Bump Node.js version to 24 in workflows, action metadata, and engines. Update TypeScript target to ES2022 and use native async/await instead of __awaiter in compiled JS. Upgrade @types/node to 24.1.0 and update undici-types. Remove legacy async helpers and refactor code for improved readability and compatibility with modern Node.js.

* update licences

* update indentation

* update package.json version

* documentation update

---------

Co-authored-by: Aparna Jyothi <aparnajyothi-y@github.com>
2025-09-02 21:50:49 -05:00
dependabot[bot]
5c125af7da Bump actions/checkout from 4 to 5 (#662)
Bumps [actions/checkout](https://github.com/actions/checkout) from 4 to 5.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-08-21 11:16:35 -05:00
gowridurgad
87c6e11776 Bumps form-data (#652)
Co-authored-by: “gowridurgad” <“hgowridurgad@github.com>
2025-07-30 14:53:25 -05:00
dependabot[bot]
06a5327ecf Bump undici from 5.28.5 to 5.29.0 (#641)
* Bump undici from 5.28.5 to 5.29.0

Bumps [undici](https://github.com/nodejs/undici) from 5.28.5 to 5.29.0.
- [Release notes](https://github.com/nodejs/undici/releases)
- [Commits](https://github.com/nodejs/undici/compare/v5.28.5...v5.29.0)

---
updated-dependencies:
- dependency-name: undici
  dependency-version: 5.29.0
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

* Check failure fix

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: lmvysakh <lmvysakh@github.com>
2025-07-29 12:06:55 -05:00
dependabot[bot]
e8e5b8203e Bump eslint-config-prettier from 9.1.0 to 10.1.5 (#639)
Bumps [eslint-config-prettier](https://github.com/prettier/eslint-config-prettier) from 9.1.0 to 10.1.5.
- [Release notes](https://github.com/prettier/eslint-config-prettier/releases)
- [Changelog](https://github.com/prettier/eslint-config-prettier/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prettier/eslint-config-prettier/compare/v9.1.0...v10.1.5)

---
updated-dependencies:
- dependency-name: eslint-config-prettier
  dependency-version: 10.1.5
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-07-15 12:29:20 -05:00
dependabot[bot]
bf4cd79173 Bump @actions/glob from 0.4.0 to 0.5.0 (#594)
* Bump @actions/glob from 0.4.0 to 0.5.0

Bumps [@actions/glob](https://github.com/actions/toolkit/tree/HEAD/packages/glob) from 0.4.0 to 0.5.0.
- [Changelog](https://github.com/actions/toolkit/blob/main/packages/glob/RELEASES.md)
- [Commits](https://github.com/actions/toolkit/commits/HEAD/packages/glob)

---
updated-dependencies:
- dependency-name: "@actions/glob"
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* Fix CI failures

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: HarithaVattikuti <73516759+HarithaVattikuti@users.noreply.github.com>
2025-07-08 12:07:13 -05:00
dependabot[bot]
4ddad1c881 Bump husky from 8.0.3 to 9.1.7 (#591)
Bumps [husky](https://github.com/typicode/husky) from 8.0.3 to 9.1.7.
- [Release notes](https://github.com/typicode/husky/releases)
- [Commits](https://github.com/typicode/husky/compare/v8.0.3...v9.1.7)

---
updated-dependencies:
- dependency-name: husky
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-07-07 13:59:28 -05:00
gowridurgad
0f55b457d2 removes end-of-line dotnet versions (#647)
Co-authored-by: “gowridurgad” <“hgowridurgad@github.com>
2025-06-24 11:36:43 -05:00
aparnajyothi-y
267870a9c4 upgrade actions/cache to 4.0.3 (#622) 2025-04-08 12:45:24 -05:00
HarithaVattikuti
67a3573c9a cache upgrade from 4.0.0 to 4.0.2 (#615) 2025-03-16 21:47:43 -05:00
Zachary Taylor
83c0c1a6c8 v4 - Remove azureedge.net fallback logic and update install scripts (#572)
* Remove logic for azureedge.net fallback in preparation for install script changes

* remove extra spacing

* Update README.md (#587)

* upgrade cache from 3.2.4 to 4.0.0 (#586)

* upgrade cache to 4.0.0

* license update

* failure fix

* e2e failure fix

* Configure Dependabot settings (#585)

* Create dependabot.yml

* update latest install scripts

* Bump actions/publish-immutable-action from 0.0.3 to 0.0.4 (#590)

Bumps [actions/publish-immutable-action](https://github.com/actions/publish-immutable-action) from 0.0.3 to 0.0.4.
- [Release notes](https://github.com/actions/publish-immutable-action/releases)
- [Commits](https://github.com/actions/publish-immutable-action/compare/0.0.3...v0.0.4)

---
updated-dependencies:
- dependency-name: actions/publish-immutable-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump @actions/http-client from 2.2.1 to 2.2.3 (#592)

* Bump @actions/http-client from 2.2.1 to 2.2.3

Bumps [@actions/http-client](https://github.com/actions/toolkit/tree/HEAD/packages/http-client) from 2.2.1 to 2.2.3.
- [Changelog](https://github.com/actions/toolkit/blob/main/packages/http-client/RELEASES.md)
- [Commits](https://github.com/actions/toolkit/commits/HEAD/packages/http-client)

---
updated-dependencies:
- dependency-name: "@actions/http-client"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* fix for the check failures

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Aparna Jyothi <aparnajyothi-y@github.com>

* Bump undici from 5.28.4 to 5.28.5 (#596)

* Bump undici from 5.28.4 to 5.28.5

Bumps [undici](https://github.com/nodejs/undici) from 5.28.4 to 5.28.5.
- [Release notes](https://github.com/nodejs/undici/releases)
- [Commits](https://github.com/nodejs/undici/compare/v5.28.4...v5.28.5)

---
updated-dependencies:
- dependency-name: undici
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

* fix for the check failures

* fix for licensed check failure

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Aparna Jyothi <aparnajyothi-y@github.com>

* Remove old URLs from E2E tests workflow

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Ben Wells <benwells@github.com>
Co-authored-by: aparnajyothi-y <147696841+aparnajyothi-y@users.noreply.github.com>
Co-authored-by: HarithaVattikuti <73516759+HarithaVattikuti@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Aparna Jyothi <aparnajyothi-y@github.com>
2025-02-12 08:36:58 -06:00
112 changed files with 101827 additions and 111555 deletions

View File

@@ -16,4 +16,4 @@ jobs:
name: Basic validation name: Basic validation
uses: actions/reusable-workflows/.github/workflows/basic-validation.yml@main uses: actions/reusable-workflows/.github/workflows/basic-validation.yml@main
with: with:
node-version: '20' node-version: '24'

View File

@@ -16,4 +16,4 @@ jobs:
name: Check dist/ name: Check dist/
uses: actions/reusable-workflows/.github/workflows/check-dist.yml@main uses: actions/reusable-workflows/.github/workflows/check-dist.yml@main
with: with:
node-version: '20' node-version: '24'

View File

@@ -17,242 +17,153 @@ jobs:
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
operating-system: [ubuntu-22.04, windows-latest, macos-13] operating-system:
[
ubuntu-22.04,
ubuntu-latest,
windows-latest,
macos-latest,
macos-15-intel
]
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v6
- 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, 3.1.404 and 3.0.x - name: Setup dotnet 8.0.416, 8.0.x, 9.0.308 and 10.0.101
uses: ./ uses: ./
with: with:
dotnet-version: | dotnet-version: |
2.2.402 8.0.416
3.1.404
3.0.x
- name: Verify dotnet
shell: pwsh
run: __tests__/verify-dotnet.ps1 -Patterns "^2.2.402$", "^3.1.404$", "^3.0"
test-setup-multiple-versions-extended:
runs-on: ${{ matrix.operating-system }}
strategy:
fail-fast: false
matrix:
operating-system: [ubuntu-latest, macos-latest]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Clear toolcache
shell: pwsh
run: __tests__/clear-toolcache.ps1 ${{ runner.os }}
- name: Setup dotnet 6.0.427, 8.0.403 and 8.0.x
uses: ./
with:
dotnet-version: |
6.0.427
8.0.403
8.0.x 8.0.x
9.0.308
10.0.101
- name: Verify dotnet - name: Verify dotnet
shell: pwsh shell: pwsh
run: __tests__/verify-dotnet.ps1 -Patterns "^6.0.427$", "^8.0.403$", "^8.0" run: __tests__/verify-dotnet.ps1 -Patterns "^8.0.416$", "^9.0.308$", "^10.0.101$", "^8.0"
test-setup-full-version: test-setup-full-version:
runs-on: ${{ matrix.operating-system }} runs-on: ${{ matrix.operating-system }}
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
operating-system: [ubuntu-22.04, windows-latest, macos-13] operating-system:
[
ubuntu-22.04,
ubuntu-latest,
windows-latest,
macos-latest,
macos-15-intel
]
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v6
- name: Clear toolcache - name: Clear toolcache
shell: pwsh shell: pwsh
run: __tests__/clear-toolcache.ps1 ${{ runner.os }} run: __tests__/clear-toolcache.ps1 ${{ runner.os }}
# Side-by-side install of 2.2 and 3.1 used for the test project # Side-by-side install of 9.0 and 10.0 used for the test project
- name: Setup dotnet 2.2.402 - name: Setup dotnet 9.0.308
uses: ./ uses: ./
with: with:
dotnet-version: 2.2.402 dotnet-version: 9.0.308
- name: Setup dotnet 3.1.201 - name: Setup dotnet 10.0.101
uses: ./ uses: ./
with: with:
dotnet-version: 3.1.201 dotnet-version: 10.0.101
# We are including this variable to force the generation of the nuget config file to verify that it is created in the correct place # We are including this variable to force the generation of the nuget config file to verify that it is created in the correct place
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
shell: pwsh shell: pwsh
run: __tests__/verify-dotnet.ps1 -Patterns "^3.1.201$", "^2.2.402$" -CheckNugetConfig run: __tests__/verify-dotnet.ps1 -Patterns "^10.0.101$", "^9.0.308$" -CheckNugetConfig
test-setup-full-version-extended:
runs-on: ${{ matrix.operating-system }}
strategy:
fail-fast: false
matrix:
operating-system: [ubuntu-latest, macos-latest]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Clear toolcache
shell: pwsh
run: __tests__/clear-toolcache.ps1 ${{ runner.os }}
# Side-by-side install of 6.0 and 8.0 used for the test project
- name: Setup dotnet 6.0.427
uses: ./
with:
dotnet-version: 6.0.427
- name: Setup dotnet 8.0.402
uses: ./
with:
dotnet-version: 8.0.402
# We are including this variable to force the generation of the nuget config file to verify that it is created in the correct place
source-url: https://api.nuget.org/v3/index.json
env:
NUGET_AUTH_TOKEN: NOTATOKEN
- name: Verify dotnet
shell: pwsh
run: __tests__/verify-dotnet.ps1 -Patterns "^8.0.402$", "^6.0.427$" -CheckNugetConfig
test-setup-without-patch-version: test-setup-without-patch-version:
runs-on: ${{ matrix.operating-system }} runs-on: ${{ matrix.operating-system }}
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
operating-system: [ubuntu-22.04, windows-latest, macos-13] operating-system:
[
ubuntu-22.04,
ubuntu-latest,
windows-latest,
macos-latest,
macos-15-intel
]
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v6
- name: Clear toolcache - name: Clear toolcache
shell: pwsh shell: pwsh
run: __tests__/clear-toolcache.ps1 ${{ runner.os }} run: __tests__/clear-toolcache.ps1 ${{ runner.os }}
# 2.0, 3.0, 5.0 needs to be in single quotes to interpret as a string instead of as an integer # 9.0, 10.0 needs to be in single quotes to interpret as a string instead of as an integer
- name: Setup dotnet '3.1' - name: Setup dotnet '9.0'
uses: ./ uses: ./
with: with:
dotnet-version: '3.1' dotnet-version: '9.0'
- name: Setup dotnet '2.2' - name: Setup dotnet '10.0'
uses: ./ uses: ./
with: with:
dotnet-version: '2.2' dotnet-version: '10.0'
- name: Verify dotnet - name: Verify dotnet
shell: pwsh shell: pwsh
run: __tests__/verify-dotnet.ps1 -Patterns "^3.1", "^2.2" run: __tests__/verify-dotnet.ps1 -Patterns "^9.0", "^10.0"
test-setup-without-patch-version-extended:
runs-on: ${{ matrix.operating-system }}
strategy:
fail-fast: false
matrix:
operating-system: [ubuntu-latest, macos-latest]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Clear toolcache
shell: pwsh
run: __tests__/clear-toolcache.ps1 ${{ runner.os }}
# 6.0, 7.0, 8.0 needs to be in single quotes to interpret as a string instead of as an integer
- name: Setup dotnet '8.0'
uses: ./
with:
dotnet-version: '8.0'
- name: Setup dotnet '6.0'
uses: ./
with:
dotnet-version: '6.0'
- name: Verify dotnet
shell: pwsh
run: __tests__/verify-dotnet.ps1 -Patterns "^8.0", "^6.0"
test-setup-prerelease-version: test-setup-prerelease-version:
runs-on: ${{ matrix.operating-system }} runs-on: ${{ matrix.operating-system }}
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
operating-system: [ubuntu-22.04, windows-latest, macos-13] operating-system:
[
ubuntu-22.04,
ubuntu-latest,
windows-latest,
macos-latest,
macos-15-intel
]
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v6
- 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 '3.1.100-preview1-014459' - name: Setup dotnet '10.0.100-preview.7.25380.108'
uses: ./ uses: ./
with: with:
dotnet-version: '3.1.100-preview1-014459' dotnet-version: '10.0.100-preview.7.25380.108'
- name: Verify dotnet - name: Verify dotnet
shell: pwsh shell: pwsh
run: __tests__/verify-dotnet.ps1 -Patterns "3.1.100-preview1-014459" run: __tests__/verify-dotnet.ps1 -Patterns "10.0.100-preview.7.25380.108"
test-setup-prerelease-version-extended:
runs-on: ${{ matrix.operating-system }}
strategy:
fail-fast: false
matrix:
operating-system: [ubuntu-latest, macos-latest]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Clear toolcache
shell: pwsh
run: __tests__/clear-toolcache.ps1 ${{ runner.os }}
- name: Setup dotnet '8.0.100-preview.1.23115.2'
uses: ./
with:
dotnet-version: '8.0.100-preview.1.23115.2'
- name: Verify dotnet
shell: pwsh
run: __tests__/verify-dotnet.ps1 -Patterns "8.0.100-preview.1.23115.2"
test-setup-latest-patch-version: test-setup-latest-patch-version:
runs-on: ${{ matrix.operating-system }} runs-on: ${{ matrix.operating-system }}
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
operating-system: [ubuntu-22.04, windows-latest, macos-13] operating-system:
[
ubuntu-22.04,
ubuntu-latest,
windows-latest,
macos-latest,
macos-15-intel
]
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v6
- 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 3.1.x - name: Setup dotnet 9.0.x
uses: ./ uses: ./
with: with:
dotnet-version: 3.1.x dotnet-version: 9.0.x
- name: Setup dotnet 2.2.X - name: Setup dotnet 10.0.X
uses: ./ uses: ./
with: with:
dotnet-version: 2.2.X dotnet-version: 10.0.X
- name: Verify dotnet - name: Verify dotnet
shell: pwsh shell: pwsh
run: __tests__/verify-dotnet.ps1 -Patterns "^2.2", "^3.1" run: __tests__/verify-dotnet.ps1 -Patterns "^9.0", "^10.0"
test-setup-latest-patch-version-extended:
runs-on: ${{ matrix.operating-system }}
strategy:
fail-fast: false
matrix:
operating-system: [ubuntu-latest, macos-latest]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Clear toolcache
shell: pwsh
run: __tests__/clear-toolcache.ps1 ${{ runner.os }}
- name: Setup dotnet 8.0.x
uses: ./
with:
dotnet-version: 8.0.x
- name: Setup dotnet 6.0.X
uses: ./
with:
dotnet-version: 6.0.X
- name: Verify dotnet
shell: pwsh
run: __tests__/verify-dotnet.ps1 -Patterns "^6.0", "^8.0"
test-ABCxx-syntax: test-ABCxx-syntax:
runs-on: ${{ matrix.operating-system }} runs-on: ${{ matrix.operating-system }}
@@ -260,79 +171,75 @@ jobs:
fail-fast: false fail-fast: false
matrix: matrix:
operating-system: operating-system:
[ubuntu-latest, windows-latest, macos-13, macos-latest] [
ubuntu-22.04,
ubuntu-latest,
windows-latest,
macos-latest,
macos-15-intel
]
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v6
- 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 6.0.4xx - name: Setup dotnet 10.0.1xx
uses: ./ uses: ./
with: with:
dotnet-version: '6.0.4xx' dotnet-version: '10.0.1xx'
- name: Verify dotnet - name: Verify dotnet
shell: pwsh shell: pwsh
run: __tests__/verify-dotnet.ps1 -Patterns "^6\.0\.4\d{2}" run: __tests__/verify-dotnet.ps1 -Patterns "^10\.0\.1\d{2}"
test-setup-with-wildcard: test-setup-with-wildcard:
runs-on: ${{ matrix.operating-system }} runs-on: ${{ matrix.operating-system }}
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
operating-system: [ubuntu-22.04, windows-latest, macos-13] operating-system:
[
ubuntu-22.04,
ubuntu-latest,
windows-latest,
macos-latest,
macos-15-intel
]
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v6
- 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 3.1.* - name: Setup dotnet 9.0.*
uses: ./ uses: ./
with: with:
dotnet-version: 3.1.* dotnet-version: 9.0.*
- name: Setup dotnet 2.2.* - name: Setup dotnet 10.0.*
uses: ./ uses: ./
with: with:
dotnet-version: 2.2.* dotnet-version: 10.0.*
- name: Verify dotnet - name: Verify dotnet
shell: pwsh shell: pwsh
run: __tests__/verify-dotnet.ps1 -Patterns "^3.1", "^2.2" run: __tests__/verify-dotnet.ps1 -Patterns "^9.0", "^10.0"
test-setup-with-wildcard-extended:
runs-on: ${{ matrix.operating-system }}
strategy:
fail-fast: false
matrix:
operating-system: [ubuntu-latest, macos-latest]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Clear toolcache
shell: pwsh
run: __tests__/clear-toolcache.ps1 ${{ runner.os }}
- name: Setup dotnet 8.0.*
uses: ./
with:
dotnet-version: 8.0.*
- name: Setup dotnet 6.0.*
uses: ./
with:
dotnet-version: 6.0.*
- name: Verify dotnet
shell: pwsh
run: __tests__/verify-dotnet.ps1 -Patterns "^8.0", "^6.0"
test-setup-global-json-specified-and-version: test-setup-global-json-specified-and-version:
runs-on: ${{ matrix.operating-system }} runs-on: ${{ matrix.operating-system }}
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
operating-system: [ubuntu-22.04, windows-latest, macos-13] operating-system:
[
ubuntu-22.04,
ubuntu-latest,
windows-latest,
macos-latest,
macos-15-intel
]
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v6
- name: Clear toolcache - name: Clear toolcache
shell: pwsh shell: pwsh
run: __tests__/clear-toolcache.ps1 ${{ runner.os }} run: __tests__/clear-toolcache.ps1 ${{ runner.os }}
@@ -340,51 +247,32 @@ jobs:
shell: bash shell: bash
run: | run: |
mkdir subdirectory mkdir subdirectory
echo '{"sdk":{"version": "2.2.207","rollForward": "latestFeature"}}' > ./subdirectory/global.json echo '{"sdk":{"version": "9.0.308","rollForward": "latestFeature"}}' > ./subdirectory/global.json
- name: Setup dotnet - name: Setup dotnet
uses: ./ uses: ./
with: with:
dotnet-version: 3.1 dotnet-version: '10.0'
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 -Patterns "^2.2", "^3.1" run: __tests__/verify-dotnet.ps1 -Patterns "^9.0", "^10.0"
test-setup-global-json-specified-and-version-extended:
runs-on: ${{ matrix.operating-system }}
strategy:
fail-fast: false
matrix:
operating-system: [ubuntu-latest, macos-latest]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Clear toolcache
shell: pwsh
run: __tests__/clear-toolcache.ps1 ${{ runner.os }}
- name: Write global.json
shell: bash
run: |
mkdir subdirectory
echo '{"sdk":{"version": "6.0.424","rollForward": "latestFeature"}}' > ./subdirectory/global.json
- name: Setup dotnet
uses: ./
with:
dotnet-version: '8.0'
global-json-file: ./subdirectory/global.json
- name: Verify dotnet
shell: pwsh
run: __tests__/verify-dotnet.ps1 -Patterns "^6.0", "^8.0"
test-setup-global-json-only: test-setup-global-json-only:
runs-on: ${{ matrix.operating-system }} runs-on: ${{ matrix.operating-system }}
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
operating-system: [ubuntu-22.04, windows-latest, macos-13] operating-system:
[
ubuntu-22.04,
ubuntu-latest,
windows-latest,
macos-latest,
macos-15-intel
]
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v6
- name: Clear toolcache - name: Clear toolcache
shell: pwsh shell: pwsh
run: __tests__/clear-toolcache.ps1 ${{ runner.os }} run: __tests__/clear-toolcache.ps1 ${{ runner.os }}
@@ -392,49 +280,31 @@ jobs:
shell: bash shell: bash
run: | run: |
mkdir subdirectory mkdir subdirectory
echo '{"sdk":{"version": "2.2.207","rollForward": "latestFeature"}}' > ./subdirectory/global.json echo '{"sdk":{"version": "10.0.101","rollForward": "latestFeature"}}' > ./subdirectory/global.json
- name: Setup dotnet - name: Setup dotnet
uses: ./ uses: ./
with: with:
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 -Patterns "^2.2" run: __tests__/verify-dotnet.ps1 -Patterns "^10.0"
test-setup-global-json-only-extended:
runs-on: ${{ matrix.operating-system }}
strategy:
fail-fast: false
matrix:
operating-system: [ubuntu-latest, macos-latest]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Clear toolcache
shell: pwsh
run: __tests__/clear-toolcache.ps1 ${{ runner.os }}
- name: Write global.json
shell: bash
run: |
mkdir subdirectory
echo '{"sdk":{"version": "6.0.424","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 "^6.0"
test-global-json-with-comments: test-global-json-with-comments:
runs-on: ${{ matrix.operating-system }} runs-on: ${{ matrix.operating-system }}
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
operating-system: [ubuntu-22.04, windows-latest, macos-13] operating-system:
[
ubuntu-22.04,
ubuntu-latest,
windows-latest,
macos-latest,
macos-15-intel
]
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v6
- name: Clear toolcache - name: Clear toolcache
shell: pwsh shell: pwsh
run: __tests__/clear-toolcache.ps1 ${{ runner.os }} run: __tests__/clear-toolcache.ps1 ${{ runner.os }}
@@ -442,39 +312,14 @@ jobs:
shell: bash shell: bash
run: | run: |
mkdir subdirectory mkdir subdirectory
echo '/* should support comments */ {"sdk":{"version": "2.2.207","rollForward": "latestFeature"}} // should support comments' > ./subdirectory/global.json echo '/* should support comments */ {"sdk":{"version": "10.0.101","rollForward": "latestFeature"}} // should support comments' > ./subdirectory/global.json
- name: Setup dotnet - name: Setup dotnet
uses: ./ uses: ./
with: with:
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 -Patterns "^2.2" run: __tests__/verify-dotnet.ps1 -Patterns "^10.0"
test-global-json-with-comments-extended:
runs-on: ${{ matrix.operating-system }}
strategy:
fail-fast: false
matrix:
operating-system: [ubuntu-latest, macos-latest]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Clear toolcache
shell: pwsh
run: __tests__/clear-toolcache.ps1 ${{ runner.os }}
- name: Write global.json
shell: bash
run: |
mkdir subdirectory
echo '/* should support comments */ {"sdk":{"version": "6.0.424","rollForward": "latestFeature"}} // should support comments' > ./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 "^6.0"
test-setup-with-dotnet-quality: test-setup-with-dotnet-quality:
runs-on: ${{ matrix.operating-system }} runs-on: ${{ matrix.operating-system }}
@@ -482,45 +327,58 @@ jobs:
fail-fast: false fail-fast: false
matrix: matrix:
operating-system: operating-system:
[ubuntu-latest, windows-latest, macos-13, macos-latest] [
ubuntu-22.04,
ubuntu-latest,
windows-latest,
macos-latest,
macos-15-intel
]
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v6
- 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 7.0 with preview quality - name: Setup dotnet 10.0 with preview quality
uses: ./ uses: ./
with: with:
dotnet-version: '7.0' dotnet-version: '10.0'
dotnet-quality: 'preview' dotnet-quality: 'preview'
- name: Verify dotnet - name: Verify dotnet
shell: pwsh shell: pwsh
run: __tests__/verify-dotnet.ps1 -Patterns "^7\.0\.\d+-" run: __tests__/verify-dotnet.ps1 -Patterns "^10\.0\.\d+-"
test-setup-with-cache: test-setup-with-cache:
runs-on: ${{ matrix.operating-system }} runs-on: ${{ matrix.operating-system }}
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
operating-system: [ubuntu-22.04, windows-latest, macos-13] operating-system:
[
ubuntu-22.04,
ubuntu-latest,
windows-latest,
macos-latest,
macos-15-intel
]
env: env:
NUGET_PACKAGES: ${{ github.workspace }}/.nuget/packages NUGET_PACKAGES: ${{ github.workspace }}/.nuget/packages
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v6
- 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: Copy NuGet lock file to root - name: Copy NuGet lock file to root
shell: bash shell: bash
run: cp ./__tests__/e2e-test-csproj/packages.lock.json ./packages.lock.json run: cp ./__tests__/e2e-test-csproj/packages.lock.json ./packages.lock.json
- name: Setup .NET Core 3.1 - name: Setup .NET Core 10.0
id: setup-dotnet id: setup-dotnet
uses: ./ uses: ./
with: with:
dotnet-version: 3.1 dotnet-version: '10.0'
cache: true cache: true
- name: Verify Cache - name: Verify Cache
if: steps.setup-dotnet.outputs.cache-hit == 'true' if: steps.setup-dotnet.outputs.cache-hit == 'true'
@@ -528,58 +386,34 @@ jobs:
run: if [[ -e ${NUGET_PACKAGES} ]]; then exit 0; else exit 1; fi run: if [[ -e ${NUGET_PACKAGES} ]]; then exit 0; else exit 1; fi
- name: Verify dotnet - name: Verify dotnet
shell: pwsh shell: pwsh
run: __tests__/verify-dotnet.ps1 -Patterns "^3.1" run: __tests__/verify-dotnet.ps1 -Patterns "^10.0"
test-setup-with-cache-extended:
runs-on: ${{ matrix.operating-system }}
strategy:
fail-fast: false
matrix:
operating-system: [ubuntu-latest, macos-latest]
env:
NUGET_PACKAGES: ${{ github.workspace }}/.nuget/packages
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Clear toolcache
shell: pwsh
run: __tests__/clear-toolcache.ps1 ${{ runner.os }}
- name: Copy NuGet lock file to root
shell: bash
run: cp ./__tests__/e2e-test-csproj/packages.lock.json ./packages.lock.json
- name: Setup .NET Core 8.0
id: setup-dotnet
uses: ./
with:
dotnet-version: '8.0'
cache: true
- name: Verify Cache
if: steps.setup-dotnet.outputs.cache-hit == 'true'
shell: bash
run: if [[ -e ${NUGET_PACKAGES} ]]; then exit 0; else exit 1; fi
- name: Verify dotnet
shell: pwsh
run: __tests__/verify-dotnet.ps1 -Patterns "^8.0"
test-setup-with-cache-dependency-path: test-setup-with-cache-dependency-path:
runs-on: ${{ matrix.operating-system }} runs-on: ${{ matrix.operating-system }}
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
operating-system: [ubuntu-22.04, windows-latest, macos-13] operating-system:
[
ubuntu-22.04,
ubuntu-latest,
windows-latest,
macos-latest,
macos-15-intel
]
env: env:
NUGET_PACKAGES: ${{ github.workspace }}/.nuget/packages NUGET_PACKAGES: ${{ github.workspace }}/.nuget/packages
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v6
- 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 .NET Core 3.1 - name: Setup .NET Core 10.0
id: setup-dotnet id: setup-dotnet
uses: ./ uses: ./
with: with:
dotnet-version: 3.1 dotnet-version: '10.0'
cache: true cache: true
cache-dependency-path: './__tests__/e2e-test-csproj/packages.lock.json' cache-dependency-path: './__tests__/e2e-test-csproj/packages.lock.json'
- name: Verify Cache - name: Verify Cache
@@ -588,36 +422,7 @@ jobs:
run: if [[ -e ${NUGET_PACKAGES} ]]; then exit 0; else exit 1; fi run: if [[ -e ${NUGET_PACKAGES} ]]; then exit 0; else exit 1; fi
- name: Verify dotnet - name: Verify dotnet
shell: pwsh shell: pwsh
run: __tests__/verify-dotnet.ps1 -Patterns "^3.1" run: __tests__/verify-dotnet.ps1 -Patterns "^10.0"
test-setup-with-cache-dependency-path-extended:
runs-on: ${{ matrix.operating-system }}
strategy:
fail-fast: false
matrix:
operating-system: [ubuntu-latest, macos-latest]
env:
NUGET_PACKAGES: ${{ github.workspace }}/.nuget/packages
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Clear toolcache
shell: pwsh
run: __tests__/clear-toolcache.ps1 ${{ runner.os }}
- name: Setup .NET Core 8.0
id: setup-dotnet
uses: ./
with:
dotnet-version: '8.0'
cache: true
cache-dependency-path: './__tests__/e2e-test-csproj/packages.lock.json'
- name: Verify Cache
if: steps.setup-dotnet.outputs.cache-hit == 'true'
shell: bash
run: if [[ -e ${NUGET_PACKAGES} ]]; then exit 0; else exit 1; fi
- name: Verify dotnet
shell: pwsh
run: __tests__/verify-dotnet.ps1 -Patterns "^8.0"
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 }}
@@ -625,19 +430,25 @@ jobs:
fail-fast: false fail-fast: false
matrix: matrix:
operating-system: operating-system:
[ubuntu-latest, windows-latest, macos-13, macos-latest] [
ubuntu-22.04,
ubuntu-latest,
windows-latest,
macos-latest,
macos-15-intel
]
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v6
- 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 6.0.401 - name: Setup dotnet 10.0.101
uses: ./ uses: ./
id: step1 id: step1
with: with:
dotnet-version: '6.0.401' dotnet-version: '10.0.101'
- name: Verify value of the dotnet-version output - name: Verify value of the dotnet-version output
shell: pwsh shell: pwsh
@@ -652,27 +463,33 @@ jobs:
fail-fast: false fail-fast: false
matrix: matrix:
operating-system: operating-system:
[ubuntu-latest, windows-latest, macos-13, macos-latest] [
ubuntu-22.04,
ubuntu-latest,
windows-latest,
macos-latest,
macos-15-intel
]
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v6
- 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 6.0.401, 5.0.408, 7.0.100-rc.1.22431.12 - name: Setup dotnet 8.0.402, 9.0.308, 10.0.101
uses: ./ uses: ./
id: step2 id: step2
with: with:
dotnet-version: | dotnet-version: |
7.0.100-rc.1.22431.12 10.0.101
6.0.401 9.0.308
5.0.408 8.0.402
- name: Verify value of the dotnet-version output - name: Verify value of the dotnet-version output
shell: pwsh shell: pwsh
run: | run: |
$version = "7.0.100-rc.1.22431.12" $version = "10.0.101"
if (-not ($version -eq '${{steps.step2.outputs.dotnet-version}}')) { throw "Unexpected output value" } if (-not ($version -eq '${{steps.step2.outputs.dotnet-version}}')) { throw "Unexpected output value" }
test-proxy: test-proxy:
@@ -690,7 +507,7 @@ jobs:
http_proxy: http://squid-proxy:3128 http_proxy: http://squid-proxy:3128
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v6
- name: Install Powershell - name: Install Powershell
run: | run: |
apt-get update apt-get update
@@ -703,103 +520,58 @@ 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 6.0 - name: Setup dotnet 10.0
uses: ./ uses: ./
with: with:
dotnet-version: 6.0 dotnet-version: 10.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
shell: pwsh shell: pwsh
run: | run: |
__tests__/verify-dotnet.ps1 -Patterns "^6.0" -CheckNugetConfig __tests__/verify-dotnet.ps1 -Patterns "^10.0" -CheckNugetConfig
test-bypass-proxy: test-bypass-proxy:
runs-on: ubuntu-22.04
env:
https_proxy: http://no-such-proxy:3128
no_proxy: github.com,dotnetcli.blob.core.windows.net,download.visualstudio.microsoft.com,api.nuget.org,dotnetcli.azureedge.net,builds.dotnet.microsoft.com,ci.dot.net
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Clear toolcache
shell: pwsh
run: __tests__/clear-toolcache.ps1 ${{ runner.os }}
- name: Setup dotnet 3.1.201
uses: ./
with:
dotnet-version: 3.1.201
source-url: https://api.nuget.org/v3/index.json
env:
NUGET_AUTH_TOKEN: NOTATOKEN
- name: Verify dotnet
shell: pwsh
run: __tests__/verify-dotnet.ps1 -Patterns "^3.1.201$" -CheckNugetConfig
test-bypass-proxy-extended:
runs-on: ubuntu-latest runs-on: ubuntu-latest
env: env:
https_proxy: http://no-such-proxy:3128 https_proxy: http://no-such-proxy:3128
no_proxy: github.com,dotnetcli.blob.core.windows.net,download.visualstudio.microsoft.com,api.nuget.org,dotnetcli.azureedge.net,builds.dotnet.microsoft.com,ci.dot.net no_proxy: github.com,download.visualstudio.microsoft.com,api.nuget.org,builds.dotnet.microsoft.com,ci.dot.net
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v6
- 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 8.0.402 - name: Setup dotnet 10.0.101
uses: ./ uses: ./
with: with:
dotnet-version: 8.0.402 dotnet-version: 10.0.101
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
shell: pwsh shell: pwsh
run: __tests__/verify-dotnet.ps1 -Patterns "^8.0.402$" -CheckNugetConfig run: __tests__/verify-dotnet.ps1 -Patterns "^10.0.101$" -CheckNugetConfig
test-sequential-version-installation: test-sequential-version-installation:
runs-on: ${{ matrix.operating-system }} runs-on: ${{ matrix.operating-system }}
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
operating-system: [ubuntu-22.04, windows-latest, macos-13] operating-system:
lower-version: ['3.1.426'] [
higher-version: ['7.0.203'] ubuntu-22.04,
ubuntu-latest,
windows-latest,
macos-latest,
macos-15-intel
]
lower-version: ['9.0.308']
higher-version: ['10.0.101']
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v6
- name: Clear toolcache
shell: pwsh
run: __tests__/clear-toolcache.ps1 ${{ runner.os }}
# Install one version, use it for something, then switch to next version
- name: Setup dotnet (lower version)
uses: ./
with:
dotnet-version: ${{ matrix.lower-version }}
- name: Verify dotnet (lower version)
shell: pwsh
run: __tests__/verify-dotnet.ps1 -Patterns "^${{ matrix.lower-version }}$"
- name: Setup dotnet (higher version)
uses: ./
with:
dotnet-version: ${{ matrix.higher-version }}
- name: Verify dotnet (higher version)
shell: pwsh
run: __tests__/verify-dotnet.ps1 -Patterns "^${{ matrix.lower-version }}$", "^${{ matrix.higher-version }}$"
test-sequential-version-installation-extended:
runs-on: ${{ matrix.operating-system }}
strategy:
fail-fast: false
matrix:
operating-system: [ubuntu-latest, macos-latest]
lower-version: ['6.0.425']
higher-version: ['8.0.403']
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Clear toolcache - name: Clear toolcache
shell: pwsh shell: pwsh
run: __tests__/clear-toolcache.ps1 ${{ runner.os }} run: __tests__/clear-toolcache.ps1 ${{ runner.os }}

View File

@@ -14,7 +14,7 @@ jobs:
steps: steps:
- name: Checking out - name: Checking out
uses: actions/checkout@v4 uses: actions/checkout@v6
- name: Publish - name: Publish
id: publish id: publish
uses: actions/publish-immutable-action@v0.0.4 uses: actions/publish-immutable-action@v0.0.4

View File

@@ -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.3.0 uses: actions/publish-action@v0.4.0
with: with:
source-tag: ${{ env.TAG_NAME }} source-tag: ${{ env.TAG_NAME }}
slack-webhook: ${{ secrets.SLACK_WEBHOOK }} slack-webhook: ${{ secrets.SLACK_WEBHOOK }}

View File

@@ -18,32 +18,17 @@ jobs:
fail-fast: false fail-fast: false
matrix: matrix:
operating-system: operating-system:
[ubuntu-latest, ubuntu-22.04, windows-latest, macos-13, macos-latest] [
dotnet-version: ['2.1', '2.2', '3.0', '3.1', '5.0', '6.0', '7.0', '8.0'] ubuntu-latest,
exclude: ubuntu-22.04,
- dotnet-version: '2.1' windows-latest,
operating-system: ubuntu-latest macos-15-intel,
- dotnet-version: '2.2' macos-latest
operating-system: ubuntu-latest ]
- dotnet-version: '3.0' dotnet-version: ['8.0', '9.0', '10.0']
operating-system: ubuntu-latest
- dotnet-version: '3.1'
operating-system: ubuntu-latest
- dotnet-version: '5.0'
operating-system: ubuntu-latest
- dotnet-version: '2.1'
operating-system: macos-latest
- dotnet-version: '2.2'
operating-system: macos-latest
- dotnet-version: '3.0'
operating-system: macos-latest
- dotnet-version: '3.1'
operating-system: macos-latest
- dotnet-version: '5.0'
operating-system: macos-latest
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v6
- name: Clear toolcache - name: Clear toolcache
shell: pwsh shell: pwsh
run: __tests__/clear-toolcache.ps1 ${{ runner.os }} run: __tests__/clear-toolcache.ps1 ${{ runner.os }}

Binary file not shown.

BIN
.licenses/npm/@actions/exec-2.0.0.dep.yml generated Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
.licenses/npm/@azure/core-client.dep.yml generated Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
.licenses/npm/@azure/core-xml.dep.yml generated Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
.licenses/npm/debug.dep.yml generated Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

119
README.md
View File

@@ -15,6 +15,13 @@ documentation:
[Software installed on github hosted runners](https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners/about-github-hosted-runners#supported-software) [Software installed on github hosted runners](https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners/about-github-hosted-runners#supported-software)
for .NET SDK versions that are currently available. for .NET SDK versions that are currently available.
## Breaking changes in V5
- Upgraded action from node20 to node24
> Make sure your runner is on version v2.327.1 or later to ensure compatibility with this release. see [Release Notes](https://github.com/actions/runner/releases/tag/v2.327.1)
For more details, see the full release notes on the [release page](https://github.com/actions/setup-dotnet/releases/tag/v5.0.0)
## Usage ## Usage
See [action.yml](action.yml) See [action.yml](action.yml)
@@ -22,10 +29,10 @@ See [action.yml](action.yml)
**Basic**: **Basic**:
```yaml ```yaml
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v6
- uses: actions/setup-dotnet@v4 - uses: actions/setup-dotnet@v5
with: with:
dotnet-version: '3.1.x' dotnet-version: '8.0.x'
- run: dotnet build <my project> - run: dotnet build <my project>
``` ```
> **Warning**: Unless a concrete version is specified in the [`global.json`](https://learn.microsoft.com/en-us/dotnet/core/tools/global-json) file, **_the latest .NET version installed on the runner (including preinstalled versions) will be used [by default](https://learn.microsoft.com/en-us/dotnet/core/versions/selection#the-sdk-uses-the-latest-installed-version)_**. Please refer to the [documentation](https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners/about-github-hosted-runners#supported-software) for the currently preinstalled .NET SDK versions. > **Warning**: Unless a concrete version is specified in the [`global.json`](https://learn.microsoft.com/en-us/dotnet/core/tools/global-json) file, **_the latest .NET version installed on the runner (including preinstalled versions) will be used [by default](https://learn.microsoft.com/en-us/dotnet/core/versions/selection#the-sdk-uses-the-latest-installed-version)_**. Please refer to the [documentation](https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners/about-github-hosted-runners#supported-software) for the currently preinstalled .NET SDK versions.
@@ -33,23 +40,23 @@ steps:
**Multiple version installation**: **Multiple version installation**:
```yml ```yml
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v6
- name: Setup dotnet - name: Setup dotnet
uses: actions/setup-dotnet@v4 uses: actions/setup-dotnet@v5
with: with:
dotnet-version: | dotnet-version: |
3.1.x 8.0.x
5.0.x 9.0.x
- run: dotnet build <my project> - run: dotnet build <my project>
``` ```
## Supported version syntax ## Supported version syntax
The `dotnet-version` input supports following syntax: 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 9.0.308, 10.0.100-preview.1.25120.13) - 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. 8.0, 8.0.x) - installs the latest patch version of .NET SDK on the channel `8.0`, 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. 8, 8.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). - **A.B.Cxx** (e.g. 8.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
@@ -59,10 +66,10 @@ This input sets up the action to install the latest build of the specified quali
```yml ```yml
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v6
- uses: actions/setup-dotnet@v4 - uses: actions/setup-dotnet@v5
with: with:
dotnet-version: '6.0.x' dotnet-version: '8.0.x'
dotnet-quality: 'preview' dotnet-quality: 'preview'
- run: dotnet build <my project> - run: dotnet build <my project>
``` ```
@@ -74,8 +81,8 @@ steps:
```yml ```yml
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v6
- uses: actions/setup-dotnet@v4 - uses: actions/setup-dotnet@v5
with: with:
global-json-file: csharp/global.json global-json-file: csharp/global.json
- run: dotnet build <my project> - run: dotnet build <my project>
@@ -91,10 +98,10 @@ The action searches for [NuGet Lock files](https://learn.microsoft.com/nuget/con
```yaml ```yaml
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v6
- uses: actions/setup-dotnet@v4 - uses: actions/setup-dotnet@v5
with: with:
dotnet-version: 6.x dotnet-version: 8.x
cache: true cache: true
- run: dotnet restore --locked-mode - run: dotnet restore --locked-mode
``` ```
@@ -116,10 +123,10 @@ steps:
env: env:
NUGET_PACKAGES: ${{ github.workspace }}/.nuget/packages NUGET_PACKAGES: ${{ github.workspace }}/.nuget/packages
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v6
- uses: actions/setup-dotnet@v4 - uses: actions/setup-dotnet@v5
with: with:
dotnet-version: 6.x dotnet-version: 8.x
cache: true cache: true
- run: dotnet restore --locked-mode - run: dotnet restore --locked-mode
``` ```
@@ -130,10 +137,10 @@ steps:
env: env:
NUGET_PACKAGES: ${{ github.workspace }}/.nuget/packages NUGET_PACKAGES: ${{ github.workspace }}/.nuget/packages
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v6
- uses: actions/setup-dotnet@v4 - uses: actions/setup-dotnet@v5
with: with:
dotnet-version: 6.x dotnet-version: 8.x
cache: true cache: true
cache-dependency-path: subdir/packages.lock.json cache-dependency-path: subdir/packages.lock.json
- run: dotnet restore --locked-mode - run: dotnet restore --locked-mode
@@ -147,12 +154,12 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
strategy: strategy:
matrix: matrix:
dotnet: [ '2.1.x', '3.1.x', '5.0.x' ] dotnet: [ '8.0.x', '9.0.x', '10.0.x' ]
name: Dotnet ${{ matrix.dotnet }} sample name: Dotnet ${{ matrix.dotnet }} sample
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v6
- name: Setup dotnet - name: Setup dotnet
uses: actions/setup-dotnet@v4 uses: actions/setup-dotnet@v5
with: with:
dotnet-version: ${{ matrix.dotnet }} dotnet-version: ${{ matrix.dotnet }}
- name: Execute dotnet - name: Execute dotnet
@@ -167,12 +174,12 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
strategy: strategy:
matrix: matrix:
dotnet: [ '2.1.x', '3.1.x', '5.0.x' ] dotnet: [ '8.0.x', '9.0.x', '10.0.x' ]
name: Dotnet ${{ matrix.dotnet }} sample name: Dotnet ${{ matrix.dotnet }} sample
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v6
- name: Setup dotnet - name: Setup dotnet
uses: actions/setup-dotnet@v4 uses: actions/setup-dotnet@v5
id: stepid id: stepid
with: with:
dotnet-version: ${{ matrix.dotnet }} dotnet-version: ${{ matrix.dotnet }}
@@ -181,15 +188,16 @@ jobs:
- name: Execute dotnet - name: Execute dotnet
run: dotnet build <my project> run: dotnet build <my project>
``` ```
>**Note**: When generating a temporary `global.json` within your workflow on Windows, ensure the command is executed using a shell such as PowerShell Core (`pwsh`) or `bash` (where supported) to avoid formatting inconsistencies that could cause .NET commands to fail.
## Setting up authentication for nuget feeds ## Setting up authentication for nuget feeds
### Github Package Registry (GPR) ### Github Package Registry (GPR)
```yml ```yml
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v6
- uses: actions/setup-dotnet@v4 - uses: actions/setup-dotnet@v5
with: with:
dotnet-version: '3.1.x' dotnet-version: '8.0.x'
source-url: https://nuget.pkg.github.com/<owner>/index.json source-url: https://nuget.pkg.github.com/<owner>/index.json
env: env:
NUGET_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}} NUGET_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
@@ -202,7 +210,7 @@ steps:
### Azure Artifacts ### Azure Artifacts
```yml ```yml
- uses: actions/setup-dotnet@v4 - uses: actions/setup-dotnet@v5
with: with:
source-url: https://pkgs.dev.azure.com/<your-organization>/_packaging/<your-feed-name>/nuget/v3/index.json source-url: https://pkgs.dev.azure.com/<your-organization>/_packaging/<your-feed-name>/nuget/v3/index.json
env: env:
@@ -213,9 +221,9 @@ steps:
### nuget.org ### nuget.org
```yml ```yml
- uses: actions/setup-dotnet@v4 - uses: actions/setup-dotnet@v5
with: with:
dotnet-version: 3.1.x dotnet-version: 8.0.x
- name: Publish the package to nuget.org - name: Publish the package to nuget.org
run: dotnet nuget push */bin/Release/*.nupkg -k $NUGET_AUTH_TOKEN -s https://api.nuget.org/v3/index.json run: dotnet nuget push */bin/Release/*.nupkg -k $NUGET_AUTH_TOKEN -s https://api.nuget.org/v3/index.json
env: env:
@@ -236,11 +244,11 @@ Using the **dotnet-version** output it's possible to get the installed by the ac
In case of a single version installation, the `dotnet-version` output contains the version that is installed by the action. In case of a single version installation, the `dotnet-version` output contains the version that is installed by the action.
```yaml ```yaml
- uses: actions/setup-dotnet@v4 - uses: actions/setup-dotnet@v5
id: stepid id: stepid
with: with:
dotnet-version: 3.1.422 dotnet-version: 8.0.416
- run: echo '${{ steps.stepid.outputs.dotnet-version }}' # outputs 3.1.422 - run: echo '${{ steps.stepid.outputs.dotnet-version }}' # outputs 8.0.416
``` ```
**Multiple version installation** **Multiple version installation**
@@ -248,27 +256,27 @@ In case of a single version installation, the `dotnet-version` output contains t
In case of a multiple version installation, the `dotnet-version` output contains the latest version that is installed by the action. In case of a multiple version installation, the `dotnet-version` output contains the latest version that is installed by the action.
```yaml ```yaml
- uses: actions/setup-dotnet@v4 - uses: actions/setup-dotnet@v5
id: stepid id: stepid
with: with:
dotnet-version: | dotnet-version: |
3.1.422 8.0.416
5.0.408 9.0.308
- run: echo '${{ steps.stepid.outputs.dotnet-version }}' # outputs 5.0.408 - run: echo '${{ steps.stepid.outputs.dotnet-version }}' # outputs 9.0.308
``` ```
**Installation from global.json** **Installation from global.json**
When the `dotnet-version` input is used along with the `global-json-file` input, the `dotnet-version` output contains the version resolved from the `global.json`. When the `dotnet-version` input is used along with the `global-json-file` input, the `dotnet-version` output contains the version resolved from the `global.json`.
```yaml ```yaml
- uses: actions/setup-dotnet@v4 - uses: actions/setup-dotnet@v5
id: stepid id: stepid
with: with:
dotnet-version: | dotnet-version: |
3.1.422 9.0.308
5.0.408 10.0.101
global-json-file: "./global.json" # contains version 2.2.207 global-json-file: "./global.json" # contains version 8.0.416
- run: echo '${{ steps.stepid.outputs.dotnet-version }}' # outputs 2.2.207 - run: echo '${{ steps.stepid.outputs.dotnet-version }}' # outputs 8.0.416
``` ```
### `cache-hit` ### `cache-hit`
@@ -301,12 +309,19 @@ build:
DOTNET_INSTALL_DIR: "path/to/directory" DOTNET_INSTALL_DIR: "path/to/directory"
NUGET_PACKAGES: ${{ github.workspace }}/.nuget/packages NUGET_PACKAGES: ${{ github.workspace }}/.nuget/packages
steps: steps:
- uses: actions/checkout@main - uses: actions/checkout@v6
- uses: actions/setup-dotnet@v4 - uses: actions/setup-dotnet@v5
with: with:
dotnet-version: '3.1.x' dotnet-version: '8.0.x'
cache: true cache: true
``` ```
You can also set `DOTNET_INSTALL_DIR` to a value based on runtime variables, such as `$HOME/.dotnet` or `${{ runner.temp }}/.dotnet` before the `setup-dotnet` step:
```yml
- name: Set DOTNET_INSTALL_DIR
run: echo "DOTNET_INSTALL_DIR=$HOME/.dotnet" >> $GITHUB_ENV
```
> **Note**: On some self-hosted or large Linux runners, installing .NET under the default `/usr/share/dotnet` location may fail due to insufficient permissions. To ensure successful installation, set `DOTNET_INSTALL_DIR` to a user-writable path.
## Recommended permissions ## Recommended permissions

View File

@@ -0,0 +1,4 @@
using Microsoft.VisualStudio.TestTools.UnitTesting;
// Sequential test execution
[assembly: DoNotParallelize]

View File

@@ -12,7 +12,7 @@ namespace test_csproj
Console.WriteLine("TestMethod"); Console.WriteLine("TestMethod");
int calculatedResult = 1000 / 25; int calculatedResult = 1000 / 25;
int expectedResult = 40; int expectedResult = 40;
Assert.AreEqual(calculatedResult, expectedResult); Assert.AreEqual(expectedResult, calculatedResult);
} }
} }
} }

File diff suppressed because it is too large Load Diff

View File

@@ -8,9 +8,9 @@
<ItemGroup> <ItemGroup>
<!-- These packages will be downloaded over the network for testing proxy settings --> <!-- 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="Microsoft.NET.Test.Sdk" Version="18.0.1" />
<PackageReference Include="MSTest.TestAdapter" Version="1.1.18" /> <PackageReference Include="MSTest.TestAdapter" Version="4.0.2" />
<PackageReference Include="MSTest.TestFramework" Version="1.1.18" /> <PackageReference Include="MSTest.TestFramework" Version="4.0.2" />
</ItemGroup> </ItemGroup>
</Project> </Project>

View File

@@ -38,7 +38,7 @@ describe('installer tests', () => {
}); });
it('should throw the error in case of non-zero exit code of the installation script. The error message should contain logs.', async () => { 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 inputVersion = '10.0.101';
const inputQuality = '' as QualityOptions; const inputQuality = '' as QualityOptions;
const errorMessage = 'fictitious error message!'; const errorMessage = 'fictitious error message!';
@@ -60,7 +60,7 @@ describe('installer tests', () => {
}); });
it('should return version of .NET SDK after installation complete', async () => { it('should return version of .NET SDK after installation complete', async () => {
const inputVersion = '3.1.100'; const inputVersion = '10.0.101';
const inputQuality = '' as QualityOptions; const inputQuality = '' as QualityOptions;
const stdout = `Fictitious dotnet version ${inputVersion} is installed`; const stdout = `Fictitious dotnet version ${inputVersion} is installed`;
getExecOutputSpy.mockImplementation(() => { getExecOutputSpy.mockImplementation(() => {
@@ -82,7 +82,7 @@ describe('installer tests', () => {
}); });
it(`should supply 'version' argument to the installation script if supplied version is in A.B.C syntax`, async () => { 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 inputVersion = '10.0.101';
const inputQuality = '' as QualityOptions; const inputQuality = '' as QualityOptions;
const stdout = `Fictitious dotnet version ${inputVersion} is installed`; const stdout = `Fictitious dotnet version ${inputVersion} is installed`;
@@ -120,7 +120,7 @@ describe('installer tests', () => {
}); });
it(`should warn if the 'quality' input is set and the supplied version is in A.B.C syntax`, async () => { 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 inputVersion = '10.0.101';
const inputQuality = 'ga' as QualityOptions; const inputQuality = 'ga' as QualityOptions;
const stdout = `Fictitious dotnet version ${inputVersion} is installed`; const stdout = `Fictitious dotnet version ${inputVersion} is installed`;
getExecOutputSpy.mockImplementation(() => { getExecOutputSpy.mockImplementation(() => {
@@ -147,7 +147,7 @@ describe('installer tests', () => {
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 () => { 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 inputVersion = '3.1';
const inputQuality = 'ga' as QualityOptions; const inputQuality = 'ga' as QualityOptions;
const stdout = `Fictitious dotnet version 3.1.100 is installed`; const stdout = `Fictitious dotnet version ${inputVersion} is installed`;
getExecOutputSpy.mockImplementation(() => { getExecOutputSpy.mockImplementation(() => {
return Promise.resolve({ return Promise.resolve({
@@ -170,12 +170,12 @@ describe('installer tests', () => {
); );
}); });
each(['6', '6.0', '6.0.x', '6.0.*', '6.0.X']).test( each(['10', '10.0', '10.0.x', '10.0.*', '10.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`, `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 => { async inputVersion => {
const inputQuality = 'ga' as QualityOptions; const inputQuality = 'ga' as QualityOptions;
const exitCode = 0; const exitCode = 0;
const stdout = `Fictitious dotnet version 6.0.0 is installed`; const stdout = `Fictitious dotnet version ${inputVersion} is installed`;
getExecOutputSpy.mockImplementation(() => { getExecOutputSpy.mockImplementation(() => {
return Promise.resolve({ return Promise.resolve({
exitCode: exitCode, exitCode: exitCode,
@@ -210,12 +210,12 @@ describe('installer tests', () => {
} }
); );
each(['6', '6.0', '6.0.x', '6.0.*', '6.0.X']).test( each(['10', '10.0', '10.0.x', '10.0.*', '10.0.X']).test(
`should supply 'channel' argument to the installation script if version (%s) isn't in A.B.C syntax`, `should supply 'channel' argument to the installation script if version (%s) isn't in A.B.C syntax`,
async inputVersion => { async inputVersion => {
const inputQuality = '' as QualityOptions; const inputQuality = '' as QualityOptions;
const exitCode = 0; const exitCode = 0;
const stdout = `Fictitious dotnet version 6.0.0 is installed`; const stdout = `Fictitious dotnet version ${inputVersion} is installed`;
getExecOutputSpy.mockImplementation(() => { getExecOutputSpy.mockImplementation(() => {
return Promise.resolve({ return Promise.resolve({
exitCode: exitCode, exitCode: exitCode,
@@ -243,8 +243,8 @@ describe('installer tests', () => {
getExecOutputSpy.mock.calls[callIndex][1] as string[] getExecOutputSpy.mock.calls[callIndex][1] as string[]
).join(' '); ).join(' ');
const expectedArgument = IS_WINDOWS const expectedArgument = IS_WINDOWS
? `-Channel 6.0` ? `-Channel 10.0`
: `--channel 6.0`; : `--channel 10.0`;
expect(scriptArguments).toContain(expectedArgument); expect(scriptArguments).toContain(expectedArgument);
} }
@@ -253,7 +253,7 @@ describe('installer tests', () => {
if (IS_WINDOWS) { if (IS_WINDOWS) {
it(`should supply '-ProxyAddress' argument to the installation script if env.variable 'https_proxy' is set`, async () => { it(`should supply '-ProxyAddress' argument to the installation script if env.variable 'https_proxy' is set`, async () => {
process.env['https_proxy'] = 'https://proxy.com'; process.env['https_proxy'] = 'https://proxy.com';
const inputVersion = '6.0.100'; const inputVersion = '10.0.101';
const inputQuality = '' as QualityOptions; const inputQuality = '' as QualityOptions;
const stdout = `Fictitious dotnet version ${inputVersion} is installed`; const stdout = `Fictitious dotnet version ${inputVersion} is installed`;
@@ -291,9 +291,9 @@ describe('installer tests', () => {
it(`should supply '-ProxyBypassList' argument to the installation script if env.variable 'no_proxy' is set`, async () => { 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'; process.env['no_proxy'] = 'first.url,second.url';
const inputVersion = '6.0.100'; const inputVersion = '10.0.101';
const inputQuality = '' as QualityOptions; const inputQuality = '' as QualityOptions;
const stdout = `Fictitious dotnet version 6.0.0 is installed`; const stdout = `Fictitious dotnet version ${inputVersion} is installed`;
getExecOutputSpy.mockImplementation(() => { getExecOutputSpy.mockImplementation(() => {
return Promise.resolve({ return Promise.resolve({
@@ -349,14 +349,14 @@ describe('installer tests', () => {
describe('DotnetVersionResolver tests', () => { describe('DotnetVersionResolver tests', () => {
describe('createDotnetVersion() tests', () => { describe('createDotnetVersion() tests', () => {
each([ each([
'3.1', '10.0',
'3.x', '10.x',
'3.1.x', '10.0.x',
'3.1.*', '10.0.*',
'3.1.X', '10.0.X',
'3.1.2', '10.0.0',
'3.1.0-preview1', '10.0.0-preview7',
'6.0.2xx' '10.0.1xx'
]).test( ]).test(
'if valid version is supplied (%s), 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 => {
@@ -408,7 +408,7 @@ describe('installer tests', () => {
} }
); );
each(['3', '3.1', '3.1.x', '3.1.*', '3.1.X', '6.0.2xx']).test( each(['10', '10.0', '10.0.x', '10.0.*', '10.0.X', '10.0.1xx']).test(
"if version that can be resolved to 'channel' option is supplied (%s), it should set 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(
@@ -423,7 +423,7 @@ describe('installer tests', () => {
} }
); );
each(['6.0', '6.0.x', '6.0.*', '6.0.X', '6.0.2xx']).test( each(['10.0', '10.0.x', '10.0.*', '10.0.X', '10.0.1xx']).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", "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 => { async version => {
const dotnetVersionResolver = new installer.DotnetVersionResolver( const dotnetVersionResolver = new installer.DotnetVersionResolver(
@@ -439,7 +439,7 @@ describe('installer tests', () => {
} }
); );
each(['3.1.2', '3.1.0-preview1']).test( each(['10.0.0', '10.0.0-preview7']).test(
"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", "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(
@@ -455,7 +455,7 @@ describe('installer tests', () => {
} }
); );
each(['3.1.2', '3.1']).test( each(['10.0.0', '10.0']).test(
'it should create proper line arguments for powershell/bash installation scripts', 'it should create proper line arguments for powershell/bash installation scripts',
async version => { async version => {
const dotnetVersionResolver = new installer.DotnetVersionResolver( const dotnetVersionResolver = new installer.DotnetVersionResolver(

Some files were not shown because too many files have changed in this diff Show More