Compare commits

..

1 Commits

Author SHA1 Message Date
Evgenii Korolevskii
7caa606d47 Update CODEOWNERS 2022-12-23 09:39:34 +01:00
139 changed files with 30456 additions and 195563 deletions

View File

@@ -1,6 +0,0 @@
# Ignore list
/*
# Do not ignore these folders:
!__tests__/
!src/

View File

@@ -1,51 +0,0 @@
// 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-node', '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}],
'node/no-extraneous-import': 'error'
},
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
View File

@@ -1,2 +1 @@
* text=auto eol=lf
.licenses/** -diff linguist-generated=true .licenses/** -diff linguist-generated=true

1
.github/CODEOWNERS vendored
View File

@@ -1 +1,2 @@
* @actions/runner-images-team
* @actions/setup-actions-team * @actions/setup-actions-team

View File

@@ -1,22 +0,0 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
version: 2
updates:
# Enable version updates for npm
- package-ecosystem: 'npm'
# Look for `package.json` and `lock` files in the `root` directory
directory: '/'
# Check the npm registry for updates every day (weekdays)
schedule:
interval: 'weekly'
# Enable version updates for GitHub Actions
- package-ecosystem: 'github-actions'
# Workflow files stored in the default location of `.github/workflows`
# You don't need to specify `/.github/workflows` for `directory`. You can use `directory: "/"`.
directory: '/'
schedule:
interval: 'weekly'

View File

@@ -14,6 +14,4 @@ on:
jobs: jobs:
call-basic-validation: call-basic-validation:
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:
node-version: '24'

View File

@@ -14,6 +14,4 @@ on:
jobs: jobs:
call-check-dist: call-check-dist:
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:
node-version: '24'

View File

@@ -2,13 +2,13 @@ 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'
jobs: jobs:
call-codeQL-analysis: call-codeQL-analysis:
name: CodeQL analysis name: CodeQL analysis
uses: actions/reusable-workflows/.github/workflows/codeql-analysis.yml@main uses: actions/reusable-workflows/.github/workflows/codeql-analysis.yml@main

View File

@@ -17,229 +17,163 @@ jobs:
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
operating-system: operating-system: [ubuntu-latest, windows-latest, macOS-latest]
[
ubuntu-22.04,
ubuntu-latest,
windows-latest,
macos-latest,
macos-15-intel
]
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v6 uses: actions/checkout@v3
- 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.416, 8.0.x, 9.0.308 and 10.0.101 - name: Setup dotnet 2.2.402 and 3.1.404
uses: ./ uses: ./
with: with:
dotnet-version: | dotnet-version: |
8.0.416 2.2.402
8.0.x 3.1.404
9.0.308 3.0.x
10.0.101
- name: Verify dotnet - name: Verify dotnet
shell: pwsh shell: pwsh
run: __tests__/verify-dotnet.ps1 -Patterns "^8.0.416$", "^9.0.308$", "^10.0.101$", "^8.0" run: __tests__/verify-dotnet.ps1 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 }}
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
operating-system: operating-system: [ubuntu-latest, windows-latest, macOS-latest]
[
ubuntu-22.04,
ubuntu-latest,
windows-latest,
macos-latest,
macos-15-intel
]
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v6 uses: actions/checkout@v3
- 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 9.0 and 10.0 used for the test project # Side-by-side install of 2.2 and 3.1 used for the test project
- name: Setup dotnet 9.0.308 - name: Setup dotnet 2.2.402
uses: ./ uses: ./
with: with:
dotnet-version: 9.0.308 dotnet-version: 2.2.402
- name: Setup dotnet 10.0.101 - name: Setup dotnet 3.1.201
uses: ./ uses: ./
with: with:
dotnet-version: 10.0.101 dotnet-version: 3.1.201
# 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 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 -Patterns "^10.0.101$", "^9.0.308$" -CheckNugetConfig run: __tests__/verify-dotnet.ps1 3.1.201 2.2.402
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: operating-system: [ubuntu-latest, windows-latest, macOS-latest]
[
ubuntu-22.04,
ubuntu-latest,
windows-latest,
macos-latest,
macos-15-intel
]
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v6 uses: actions/checkout@v3
- name: Clear toolcache - name: Clear toolcache
shell: pwsh shell: pwsh
run: __tests__/clear-toolcache.ps1 ${{ runner.os }} run: __tests__/clear-toolcache.ps1 ${{ runner.os }}
# 9.0, 10.0 needs to be in single quotes to interpret as a string instead of as an integer # 2.0, 3.0, 5.0 needs to be in single quotes to interpret as a string instead of as an integer
- name: Setup dotnet '9.0' - name: Setup dotnet '3.1'
uses: ./ uses: ./
with: with:
dotnet-version: '9.0' dotnet-version: '3.1'
- name: Setup dotnet '10.0' - name: Setup dotnet '2.2'
uses: ./ uses: ./
with: with:
dotnet-version: '10.0' dotnet-version: '2.2'
- name: Verify dotnet - name: Verify dotnet
shell: pwsh shell: pwsh
run: __tests__/verify-dotnet.ps1 -Patterns "^9.0", "^10.0" run: __tests__/verify-dotnet.ps1 3.1 2.2
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: operating-system: [ubuntu-latest, windows-latest, macOS-latest]
[
ubuntu-22.04,
ubuntu-latest,
windows-latest,
macos-latest,
macos-15-intel
]
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v6 uses: actions/checkout@v3
- 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 '10.0.100-preview.7.25380.108' - name: Setup dotnet '2.2'
uses: ./ uses: ./
with: with:
dotnet-version: '10.0.100-preview.7.25380.108' dotnet-version: '2.2'
- name: Setup dotnet '3.1.100-preview1-014459'
uses: ./
with:
dotnet-version: '3.1.100-preview1-014459'
- name: Verify dotnet - name: Verify dotnet
shell: pwsh shell: pwsh
run: __tests__/verify-dotnet.ps1 -Patterns "10.0.100-preview.7.25380.108" run: __tests__/verify-dotnet.ps1 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 }}
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
operating-system: operating-system: [ubuntu-latest, windows-latest, macOS-latest]
[
ubuntu-22.04,
ubuntu-latest,
windows-latest,
macos-latest,
macos-15-intel
]
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v6 uses: actions/checkout@v3
- 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 9.0.x - name: Setup dotnet 3.1.x
uses: ./ uses: ./
with: with:
dotnet-version: 9.0.x dotnet-version: 3.1.x
- name: Setup dotnet 10.0.X - name: Setup dotnet 2.2.X
uses: ./ uses: ./
with: with:
dotnet-version: 10.0.X dotnet-version: 2.2.X
- name: Verify dotnet - name: Verify dotnet
shell: pwsh shell: pwsh
run: __tests__/verify-dotnet.ps1 -Patterns "^9.0", "^10.0" run: __tests__/verify-dotnet.ps1 '2.2' '3.1'
test-ABCxx-syntax:
runs-on: ${{ matrix.operating-system }}
strategy:
fail-fast: false
matrix:
operating-system:
[
ubuntu-22.04,
ubuntu-latest,
windows-latest,
macos-latest,
macos-15-intel
]
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Clear toolcache
shell: pwsh
run: __tests__/clear-toolcache.ps1 ${{ runner.os }}
- name: Setup dotnet 10.0.1xx
uses: ./
with:
dotnet-version: '10.0.1xx'
- name: Verify dotnet
shell: pwsh
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: operating-system: [ubuntu-latest, windows-latest, macOS-latest]
[
ubuntu-22.04,
ubuntu-latest,
windows-latest,
macos-latest,
macos-15-intel
]
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v6 uses: actions/checkout@v3
- 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 9.0.* - name: Setup dotnet 3.1.*
uses: ./ uses: ./
with: with:
dotnet-version: 9.0.* dotnet-version: 3.1.*
- name: Setup dotnet 10.0.* - name: Setup dotnet 2.2.*
uses: ./ uses: ./
with: with:
dotnet-version: 10.0.* dotnet-version: 2.2.*
- name: Verify dotnet - name: Verify dotnet
shell: pwsh shell: pwsh
run: __tests__/verify-dotnet.ps1 -Patterns "^9.0", "^10.0" run: __tests__/verify-dotnet.ps1 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 }}
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
operating-system: operating-system: [ubuntu-latest, windows-latest, macOS-latest]
[
ubuntu-22.04,
ubuntu-latest,
windows-latest,
macos-latest,
macos-15-intel
]
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v6 uses: actions/checkout@v3
- name: Clear toolcache - name: Clear toolcache
shell: pwsh shell: pwsh
run: __tests__/clear-toolcache.ps1 ${{ runner.os }} run: __tests__/clear-toolcache.ps1 ${{ runner.os }}
@@ -247,255 +181,99 @@ jobs:
shell: bash shell: bash
run: | run: |
mkdir subdirectory mkdir subdirectory
echo '{"sdk":{"version": "9.0.308","rollForward": "latestFeature"}}' > ./subdirectory/global.json echo '{"sdk":{"version": "2.2","rollForward": "latestFeature"}}' > ./subdirectory/global.json
- name: Setup dotnet - name: Setup dotnet
uses: ./ uses: ./
with: with:
dotnet-version: '10.0' dotnet-version: 3.1
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 "^9.0", "^10.0" run: __tests__/verify-dotnet.ps1 2.2 3.1
test-setup-global-json-only:
runs-on: ${{ matrix.operating-system }}
strategy:
fail-fast: false
matrix:
operating-system:
[
ubuntu-22.04,
ubuntu-latest,
windows-latest,
macos-latest,
macos-15-intel
]
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Clear toolcache
shell: pwsh
run: __tests__/clear-toolcache.ps1 ${{ runner.os }}
- name: Write global.json
shell: bash
run: |
mkdir subdirectory
echo '{"sdk":{"version": "10.0.101","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 "^10.0"
test-global-json-with-comments:
runs-on: ${{ matrix.operating-system }}
strategy:
fail-fast: false
matrix:
operating-system:
[
ubuntu-22.04,
ubuntu-latest,
windows-latest,
macos-latest,
macos-15-intel
]
steps:
- name: Checkout
uses: actions/checkout@v6
- 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": "10.0.101","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 "^10.0"
test-setup-with-dotnet-quality: test-setup-with-dotnet-quality:
runs-on: ${{ matrix.operating-system }} runs-on: ${{ matrix.operating-system }}
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
operating-system: operating-system: [ubuntu-latest, windows-latest, macOS-latest]
[ steps:
ubuntu-22.04, - name: Checkout
ubuntu-latest, uses: actions/checkout@v3
windows-latest, - name: Clear toolcache
macos-latest, shell: pwsh
macos-15-intel run: __tests__/clear-toolcache.ps1 ${{ runner.os }}
]
steps: - name: Setup dotnet 7.0 with preview quality
- name: Checkout uses: ./
uses: actions/checkout@v6 with:
- name: Clear toolcache dotnet-version: "7.0"
shell: pwsh dotnet-quality: "preview"
run: __tests__/clear-toolcache.ps1 ${{ runner.os }} - name: Verify preview version
shell: pwsh
- name: Setup dotnet 10.0 with preview quality run: |
uses: ./ $version = & dotnet --version
with: Write-Host "Installed version: $version"
dotnet-version: '10.0' if (-not ($version.Contains("preview") -or $version.Contains("rc"))) { throw "Unexpected version" }
dotnet-quality: 'preview'
- name: Verify dotnet
shell: pwsh
run: __tests__/verify-dotnet.ps1 -Patterns "^10\.0\.\d+-"
test-setup-with-cache:
runs-on: ${{ matrix.operating-system }}
strategy:
fail-fast: false
matrix:
operating-system:
[
ubuntu-22.04,
ubuntu-latest,
windows-latest,
macos-latest,
macos-15-intel
]
env:
NUGET_PACKAGES: ${{ github.workspace }}/.nuget/packages
steps:
- name: Checkout
uses: actions/checkout@v6
- 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 10.0
id: setup-dotnet
uses: ./
with:
dotnet-version: '10.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 "^10.0"
test-setup-with-cache-dependency-path:
runs-on: ${{ matrix.operating-system }}
strategy:
fail-fast: false
matrix:
operating-system:
[
ubuntu-22.04,
ubuntu-latest,
windows-latest,
macos-latest,
macos-15-intel
]
env:
NUGET_PACKAGES: ${{ github.workspace }}/.nuget/packages
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Clear toolcache
shell: pwsh
run: __tests__/clear-toolcache.ps1 ${{ runner.os }}
- name: Setup .NET Core 10.0
id: setup-dotnet
uses: ./
with:
dotnet-version: '10.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 "^10.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 }}
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
operating-system: operating-system: [ubuntu-latest, windows-latest, macOS-latest]
[ steps:
ubuntu-22.04, - name: Checkout
ubuntu-latest, uses: actions/checkout@v3
windows-latest, - name: Clear toolcache
macos-latest, shell: pwsh
macos-15-intel run: __tests__/clear-toolcache.ps1 ${{ runner.os }}
]
steps: - name: Setup dotnet 6.0.401
- name: Checkout uses: ./
uses: actions/checkout@v6 id: step1
- name: Clear toolcache with:
shell: pwsh dotnet-version: "6.0.401"
run: __tests__/clear-toolcache.ps1 ${{ runner.os }}
- name: Setup dotnet 10.0.101
uses: ./
id: step1
with:
dotnet-version: '10.0.101'
- name: Verify value of the dotnet-version output
shell: pwsh
run: |
$version = & dotnet --version
Write-Host "Installed version: $version"
if (-not ($version -eq '${{steps.step1.outputs.dotnet-version}}')) { throw "Unexpected output value" }
- name: Verify value of the dotnet-version output
shell: pwsh
run: |
$version = & dotnet --version
Write-Host "Installed version: $version"
if (-not ($version -eq '${{steps.step1.outputs.dotnet-version}}')) { throw "Unexpected output value" }
test-dotnet-version-output-during-multiple-version-installation: test-dotnet-version-output-during-multiple-version-installation:
runs-on: ${{ matrix.operating-system }} runs-on: ${{ matrix.operating-system }}
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
operating-system: operating-system: [ubuntu-latest, windows-latest, macOS-latest]
[ steps:
ubuntu-22.04, - name: Checkout
ubuntu-latest, uses: actions/checkout@v3
windows-latest, - name: Clear toolcache
macos-latest, shell: pwsh
macos-15-intel run: __tests__/clear-toolcache.ps1 ${{ runner.os }}
]
steps: - name: Setup dotnet 6.0.401, 5.0.408, 7.0.100-rc.1.22431.12
- name: Checkout uses: ./
uses: actions/checkout@v6 id: step2
- name: Clear toolcache with:
shell: pwsh dotnet-version: |
run: __tests__/clear-toolcache.ps1 ${{ runner.os }} 7.0.100-rc.1.22431.12
6.0.401
5.0.408
- name: Setup dotnet 8.0.402, 9.0.308, 10.0.101 - name: Verify value of the dotnet-version output
uses: ./ shell: pwsh
id: step2 run: |
with: $version = "7.0.100-rc.1.22431.12"
dotnet-version: | if (-not ($version -eq '${{steps.step2.outputs.dotnet-version}}')) { throw "Unexpected output value" }
10.0.101
9.0.308
8.0.402
- name: Verify value of the dotnet-version output
shell: pwsh
run: |
$version = "10.0.101"
if (-not ($version -eq '${{steps.step2.outputs.dotnet-version}}')) { throw "Unexpected output value" }
test-proxy: test-proxy:
runs-on: ubuntu-22.04 runs-on: ubuntu-latest
container: container:
image: mcr.microsoft.com/devcontainers/dotnet:10.0 image: mcr.microsoft.com/dotnet/core/runtime-deps:3.0-bionic
options: --dns 127.0.0.1 options: --dns 127.0.0.1
services: services:
squid-proxy: squid-proxy:
@@ -507,145 +285,39 @@ jobs:
http_proxy: http://squid-proxy:3128 http_proxy: http://squid-proxy:3128
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v6 uses: actions/checkout@v3
- name: Clear toolcache - name: Clear tool cache
shell: pwsh run: rm -rf "/usr/share/dotnet"
run: __tests__/clear-toolcache.ps1 ${{ runner.os }} - name: Install curl
- name: Setup dotnet 10.0 run: |
apt update
apt -y install curl
- name: Setup dotnet 3.1.201
uses: ./ uses: ./
with: with:
dotnet-version: 10.0 dotnet-version: 3.1.201
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 run: __tests__/verify-dotnet.sh 3.1.201
run: |
__tests__/verify-dotnet.ps1 -Patterns "^10.0" -CheckNugetConfig
test-bypass-proxy: test-bypass-proxy:
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,download.visualstudio.microsoft.com,api.nuget.org,builds.dotnet.microsoft.com,ci.dot.net no_proxy: github.com,dotnetcli.blob.core.windows.net,download.visualstudio.microsoft.com,api.nuget.org,dotnetcli.azureedge.net
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v6 uses: actions/checkout@v3
- name: Clear toolcache - name: Clear tool cache
shell: pwsh run: rm -rf "/usr/share/dotnet"
run: __tests__/clear-toolcache.ps1 ${{ runner.os }} - name: Setup dotnet 3.1.201
- name: Setup dotnet 10.0.101
uses: ./ uses: ./
with: with:
dotnet-version: 10.0.101 dotnet-version: 3.1.201
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 run: __tests__/verify-dotnet.sh 3.1.201
run: __tests__/verify-dotnet.ps1 -Patterns "^10.0.101$" -CheckNugetConfig
test-sequential-version-installation:
runs-on: ${{ matrix.operating-system }}
strategy:
fail-fast: false
matrix:
operating-system:
[
ubuntu-22.04,
ubuntu-latest,
windows-latest,
macos-latest,
macos-15-intel
]
lower-version: ['9.0.308']
higher-version: ['10.0.101']
steps:
- name: Checkout
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-setup-with-workloads-input:
runs-on: ${{ matrix.operating-system }}
strategy:
fail-fast: false
matrix:
operating-system:
[ubuntu-latest, windows-latest, macos-15-intel, macos-latest]
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Clear toolcache
shell: pwsh
run: __tests__/clear-toolcache.ps1 ${{ runner.os }}
- name: Setup dotnet 9.0 with workloads
uses: ./
id: setup-dotnet
with:
dotnet-version: '9.0'
workloads: wasm-tools
- name: Verify workload
shell: pwsh
run: |
$output = dotnet workload list | Out-String
Write-Host "Workload list output:"
Write-Host $output
if ($output -notmatch "wasm-tools") {
throw "Expected workload 'wasm-tools' not found"
}
- name: Verify dotnet
shell: pwsh
run: __tests__/verify-dotnet.ps1 -Patterns "^9\.0"
test-setup-with-architecture-input:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
arch: [x64, arm64]
exclude:
- os: windows-latest
arch: arm64
- os: ubuntu-latest
arch: arm64
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Clear toolcache
shell: pwsh
run: __tests__/clear-toolcache.ps1 ${{ runner.os }}
- name: Setup dotnet (${{ matrix.arch }})
uses: ./
with:
dotnet-version: |
8.0.416
8.0.x
9.0.308
10.0.101
architecture: ${{ matrix.arch }}
- name: Verify dotnet
shell: pwsh
run: __tests__/verify-dotnet.ps1 -Patterns "^8.0.416$", "^9.0.308$", "^10.0.101$", "^8.0"

View File

@@ -12,4 +12,4 @@ on:
jobs: jobs:
call-licensed: call-licensed:
name: Licensed name: Licensed
uses: actions/reusable-workflows/.github/workflows/licensed.yml@main uses: actions/reusable-workflows/.github/workflows/licensed.yml@main

View File

@@ -1,20 +0,0 @@
name: 'Publish Immutable Action Version'
on:
release:
types: [published]
jobs:
publish:
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
packages: write
steps:
- name: Checking out
uses: actions/checkout@v6
- name: Publish
id: publish
uses: actions/publish-immutable-action@v0.0.4

View File

@@ -21,9 +21,9 @@ jobs:
name: releaseNewActionVersion name: releaseNewActionVersion
runs-on: ubuntu-latest runs-on: ubuntu-latest
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.4.0 uses: actions/publish-action@v0.2.1
with: with:
source-tag: ${{ env.TAG_NAME }} source-tag: ${{ env.TAG_NAME }}
slack-webhook: ${{ secrets.SLACK_WEBHOOK }} slack-webhook: ${{ secrets.SLACK_WEBHOOK }}

View File

@@ -17,18 +17,11 @@ jobs:
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
operating-system: operating-system: [ubuntu-latest, windows-latest, macOS-latest]
[ dotnet-version: ['2.1', '2.2', '3.0', '3.1', '5.0']
ubuntu-latest,
ubuntu-22.04,
windows-latest,
macos-15-intel,
macos-latest
]
dotnet-version: ['8.0', '9.0', '10.0']
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v6 uses: actions/checkout@v3
- name: Clear toolcache - name: Clear toolcache
shell: pwsh shell: pwsh
run: __tests__/clear-toolcache.ps1 ${{ runner.os }} run: __tests__/clear-toolcache.ps1 ${{ runner.os }}
@@ -36,7 +29,9 @@ jobs:
uses: ./ uses: ./
with: with:
dotnet-version: ${{ matrix.dotnet-version }} dotnet-version: ${{ matrix.dotnet-version }}
- name: Verify installed version - name: Check installed version
shell: pwsh shell: pwsh
run: | run: |
__tests__/verify-dotnet.ps1 -Patterns "^${{ matrix.dotnet-version }}" $version = & dotnet --version
Write-Host "Installed version: $version"
if (-not $version.StartsWith("${{ matrix.dotnet-version }}")) { throw "Unexpected version" }

View File

@@ -1,11 +0,0 @@
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
View File

@@ -3,8 +3,8 @@ global.json
lib/ lib/
node_modules/ node_modules/
__tests__/runner/* __tests__/runner/*
__tests__/e2e-test-csproj/bin/ __tests__/sample-csproj/bin/
__tests__/e2e-test-csproj/obj/ __tests__/sample-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

View File

@@ -2,4 +2,3 @@
. "$(dirname -- "$0")/_/husky.sh" . "$(dirname -- "$0")/_/husky.sh"
npm run format npm run format
npm run lint:fix

View File

@@ -3,4 +3,3 @@
# 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

View File

@@ -3,7 +3,6 @@ sources:
allowed: allowed:
- apache-2.0 - apache-2.0
- 0bsd
- bsd-2-clause - bsd-2-clause
- bsd-3-clause - bsd-3-clause
- isc - isc
@@ -12,5 +11,4 @@ allowed:
- unlicense - unlicense
reviewed: reviewed:
npm: npm:
- sax # ISC + MIT

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.

BIN
.licenses/npm/btoa-lite.dep.yml generated Normal file

Binary file not shown.

BIN
.licenses/npm/cross-spawn.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.

BIN
.licenses/npm/is-plain-object.dep.yml generated Normal file

Binary file not shown.

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

Binary file not shown.

Binary file not shown.

BIN
.licenses/npm/lodash.get.dep.yml generated Normal file

Binary file not shown.

BIN
.licenses/npm/lodash.set.dep.yml generated Normal file

Binary file not shown.

BIN
.licenses/npm/lodash.uniq.dep.yml generated Normal file

Binary file not shown.

BIN
.licenses/npm/macos-release.dep.yml generated Normal file

Binary file not shown.

BIN
.licenses/npm/node-fetch.dep.yml generated Normal file

Binary file not shown.

BIN
.licenses/npm/npm-run-path.dep.yml generated Normal file

Binary file not shown.

Binary file not shown.

BIN
.licenses/npm/p-finally.dep.yml generated Normal file

Binary file not shown.

BIN
.licenses/npm/shebang-regex.dep.yml generated Normal file

Binary file not shown.

BIN
.licenses/npm/signal-exit.dep.yml generated Normal file

Binary file not shown.

BIN
.licenses/npm/strip-eof.dep.yml generated Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
.licenses/npm/webidl-conversions.dep.yml generated Normal file

Binary file not shown.

BIN
.licenses/npm/windows-release.dep.yml generated Normal file

Binary file not shown.

Binary file not shown.

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