mirror of
				https://github.com/actions/setup-dotnet.git
				synced 2025-11-04 10:13:47 +00:00 
			
		
		
		
	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>
		
			
				
	
	
		
			811 lines
		
	
	
		
			25 KiB
		
	
	
	
		
			YAML
		
	
	
	
	
	
			
		
		
	
	
			811 lines
		
	
	
		
			25 KiB
		
	
	
	
		
			YAML
		
	
	
	
	
	
name: e2e tests
 | 
						|
 | 
						|
on:
 | 
						|
  pull_request:
 | 
						|
    paths-ignore:
 | 
						|
      - '**.md'
 | 
						|
  push:
 | 
						|
    branches:
 | 
						|
      - main
 | 
						|
      - releases/*
 | 
						|
    paths-ignore:
 | 
						|
      - '**.md'
 | 
						|
 | 
						|
jobs:
 | 
						|
  test-setup-multiple-versions:
 | 
						|
    runs-on: ${{ matrix.operating-system }}
 | 
						|
    strategy:
 | 
						|
      fail-fast: false
 | 
						|
      matrix:
 | 
						|
        operating-system: [ubuntu-22.04, windows-latest, macos-13]
 | 
						|
    steps:
 | 
						|
      - name: Checkout
 | 
						|
        uses: actions/checkout@v5
 | 
						|
      - name: Clear toolcache
 | 
						|
        shell: pwsh
 | 
						|
        run: __tests__/clear-toolcache.ps1 ${{ runner.os }}
 | 
						|
      - name: Setup dotnet 6.0.427, 7.0.410 and 7.0.x
 | 
						|
        uses: ./
 | 
						|
        with:
 | 
						|
          dotnet-version: |
 | 
						|
            6.0.427
 | 
						|
            7.0.410
 | 
						|
            7.0.x
 | 
						|
      - name: Verify dotnet
 | 
						|
        shell: pwsh
 | 
						|
        run: __tests__/verify-dotnet.ps1 -Patterns "^6.0.427$", "^7.0.410$", "^7.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@v5
 | 
						|
      - name: Clear toolcache
 | 
						|
        shell: pwsh
 | 
						|
        run: __tests__/clear-toolcache.ps1 ${{ runner.os }}
 | 
						|
      - name: Setup dotnet 8.0.403, 9.0.301 and 8.0.x
 | 
						|
        uses: ./
 | 
						|
        with:
 | 
						|
          dotnet-version: |
 | 
						|
            8.0.403
 | 
						|
            9.0.301
 | 
						|
            8.0.x
 | 
						|
      - name: Verify dotnet
 | 
						|
        shell: pwsh
 | 
						|
        run: __tests__/verify-dotnet.ps1 -Patterns "^8.0.403$", "^9.0.301$", "^8.0"
 | 
						|
  test-setup-full-version:
 | 
						|
    runs-on: ${{ matrix.operating-system }}
 | 
						|
    strategy:
 | 
						|
      fail-fast: false
 | 
						|
      matrix:
 | 
						|
        operating-system: [ubuntu-22.04, windows-latest, macos-13]
 | 
						|
    steps:
 | 
						|
      - name: Checkout
 | 
						|
        uses: actions/checkout@v5
 | 
						|
      - name: Clear toolcache
 | 
						|
        shell: pwsh
 | 
						|
        run: __tests__/clear-toolcache.ps1 ${{ runner.os }}
 | 
						|
      # Side-by-side install of 6.0 and 7.0 used for the test project
 | 
						|
      - name: Setup dotnet 6.0.427
 | 
						|
        uses: ./
 | 
						|
        with:
 | 
						|
          dotnet-version: 6.0.427
 | 
						|
      - name: Setup dotnet 7.0.410
 | 
						|
        uses: ./
 | 
						|
        with:
 | 
						|
          dotnet-version: 7.0.410
 | 
						|
          # 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 "^7.0.410$", "^6.0.427$" -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@v5
 | 
						|
      - name: Clear toolcache
 | 
						|
        shell: pwsh
 | 
						|
        run: __tests__/clear-toolcache.ps1 ${{ runner.os }}
 | 
						|
      # Side-by-side install of 8.0 and 9.0 used for the test project
 | 
						|
      - name: Setup dotnet 8.0.402
 | 
						|
        uses: ./
 | 
						|
        with:
 | 
						|
          dotnet-version: 8.0.402
 | 
						|
      - name: Setup dotnet 9.0.301
 | 
						|
        uses: ./
 | 
						|
        with:
 | 
						|
          dotnet-version: 9.0.301
 | 
						|
          # 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 "^9.0.301$", "^8.0.402$" -CheckNugetConfig
 | 
						|
  test-setup-without-patch-version:
 | 
						|
    runs-on: ${{ matrix.operating-system }}
 | 
						|
    strategy:
 | 
						|
      fail-fast: false
 | 
						|
      matrix:
 | 
						|
        operating-system: [ubuntu-22.04, windows-latest, macos-13]
 | 
						|
    steps:
 | 
						|
      - name: Checkout
 | 
						|
        uses: actions/checkout@v5
 | 
						|
      - name: Clear toolcache
 | 
						|
        shell: pwsh
 | 
						|
        run: __tests__/clear-toolcache.ps1 ${{ runner.os }}
 | 
						|
      # 6.0, 7.0 needs to be in single quotes to interpret as a string instead of as an integer
 | 
						|
      - name: Setup dotnet '6.0'
 | 
						|
        uses: ./
 | 
						|
        with:
 | 
						|
          dotnet-version: '6.0'
 | 
						|
      - name: Setup dotnet '7.0'
 | 
						|
        uses: ./
 | 
						|
        with:
 | 
						|
          dotnet-version: '7.0'
 | 
						|
      - name: Verify dotnet
 | 
						|
        shell: pwsh
 | 
						|
        run: __tests__/verify-dotnet.ps1 -Patterns "^6.0", "^7.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@v5
 | 
						|
      - name: Clear toolcache
 | 
						|
        shell: pwsh
 | 
						|
        run: __tests__/clear-toolcache.ps1 ${{ runner.os }}
 | 
						|
      # 8.0, 9.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 '9.0'
 | 
						|
        uses: ./
 | 
						|
        with:
 | 
						|
          dotnet-version: '9.0'
 | 
						|
      - name: Verify dotnet
 | 
						|
        shell: pwsh
 | 
						|
        run: __tests__/verify-dotnet.ps1 -Patterns "^8.0", "^9.0"
 | 
						|
  test-setup-prerelease-version:
 | 
						|
    runs-on: ${{ matrix.operating-system }}
 | 
						|
    strategy:
 | 
						|
      fail-fast: false
 | 
						|
      matrix:
 | 
						|
        operating-system: [ubuntu-22.04, windows-latest, macos-13]
 | 
						|
    steps:
 | 
						|
      - name: Checkout
 | 
						|
        uses: actions/checkout@v5
 | 
						|
      - name: Clear toolcache
 | 
						|
        shell: pwsh
 | 
						|
        run: __tests__/clear-toolcache.ps1 ${{ runner.os }}
 | 
						|
      - name: Setup dotnet '6.0.100-preview.7.21379.14'
 | 
						|
        uses: ./
 | 
						|
        with:
 | 
						|
          dotnet-version: '6.0.100-preview.7.21379.14'
 | 
						|
      - name: Verify dotnet
 | 
						|
        shell: pwsh
 | 
						|
        run: __tests__/verify-dotnet.ps1 -Patterns "6.0.100-preview.7.21379.14"
 | 
						|
 | 
						|
  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@v5
 | 
						|
      - 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:
 | 
						|
    runs-on: ${{ matrix.operating-system }}
 | 
						|
    strategy:
 | 
						|
      fail-fast: false
 | 
						|
      matrix:
 | 
						|
        operating-system: [ubuntu-22.04, windows-latest, macos-13]
 | 
						|
    steps:
 | 
						|
      - name: Checkout
 | 
						|
        uses: actions/checkout@v5
 | 
						|
      - name: Clear toolcache
 | 
						|
        shell: pwsh
 | 
						|
        run: __tests__/clear-toolcache.ps1 ${{ runner.os }}
 | 
						|
      - name: Setup dotnet 6.0.x
 | 
						|
        uses: ./
 | 
						|
        with:
 | 
						|
          dotnet-version: 6.0.x
 | 
						|
      - name: Setup dotnet 7.0.X
 | 
						|
        uses: ./
 | 
						|
        with:
 | 
						|
          dotnet-version: 7.0.X
 | 
						|
      - name: Verify dotnet
 | 
						|
        shell: pwsh
 | 
						|
        run: __tests__/verify-dotnet.ps1 -Patterns "^6.0", "^7.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@v5
 | 
						|
      - 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 9.0.X
 | 
						|
        uses: ./
 | 
						|
        with:
 | 
						|
          dotnet-version: 9.0.X
 | 
						|
      - name: Verify dotnet
 | 
						|
        shell: pwsh
 | 
						|
        run: __tests__/verify-dotnet.ps1 -Patterns "^8.0", "^9.0"
 | 
						|
 | 
						|
  test-ABCxx-syntax:
 | 
						|
    runs-on: ${{ matrix.operating-system }}
 | 
						|
    strategy:
 | 
						|
      fail-fast: false
 | 
						|
      matrix:
 | 
						|
        operating-system:
 | 
						|
          [ubuntu-latest, windows-latest, macos-13, macos-latest]
 | 
						|
    steps:
 | 
						|
      - name: Checkout
 | 
						|
        uses: actions/checkout@v5
 | 
						|
      - name: Clear toolcache
 | 
						|
        shell: pwsh
 | 
						|
        run: __tests__/clear-toolcache.ps1 ${{ runner.os }}
 | 
						|
 | 
						|
      - name: Setup dotnet 6.0.4xx
 | 
						|
        uses: ./
 | 
						|
        with:
 | 
						|
          dotnet-version: '6.0.4xx'
 | 
						|
      - name: Verify dotnet
 | 
						|
        shell: pwsh
 | 
						|
        run: __tests__/verify-dotnet.ps1 -Patterns "^6\.0\.4\d{2}"
 | 
						|
 | 
						|
  test-setup-with-wildcard:
 | 
						|
    runs-on: ${{ matrix.operating-system }}
 | 
						|
    strategy:
 | 
						|
      fail-fast: false
 | 
						|
      matrix:
 | 
						|
        operating-system: [ubuntu-22.04, windows-latest, macos-13]
 | 
						|
    steps:
 | 
						|
      - name: Checkout
 | 
						|
        uses: actions/checkout@v5
 | 
						|
      - name: Clear toolcache
 | 
						|
        shell: pwsh
 | 
						|
        run: __tests__/clear-toolcache.ps1 ${{ runner.os }}
 | 
						|
      - name: Setup dotnet 6.0.*
 | 
						|
        uses: ./
 | 
						|
        with:
 | 
						|
          dotnet-version: 6.0.*
 | 
						|
      - name: Setup dotnet 7.0.*
 | 
						|
        uses: ./
 | 
						|
        with:
 | 
						|
          dotnet-version: 7.0.*
 | 
						|
      - name: Verify dotnet
 | 
						|
        shell: pwsh
 | 
						|
        run: __tests__/verify-dotnet.ps1 -Patterns "^6.0", "^7.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@v5
 | 
						|
      - 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 9.0.*
 | 
						|
        uses: ./
 | 
						|
        with:
 | 
						|
          dotnet-version: 9.0.*
 | 
						|
      - name: Verify dotnet
 | 
						|
        shell: pwsh
 | 
						|
        run: __tests__/verify-dotnet.ps1 -Patterns "^8.0", "^9.0"
 | 
						|
 | 
						|
  test-setup-global-json-specified-and-version:
 | 
						|
    runs-on: ${{ matrix.operating-system }}
 | 
						|
    strategy:
 | 
						|
      fail-fast: false
 | 
						|
      matrix:
 | 
						|
        operating-system: [ubuntu-22.04, windows-latest, macos-13]
 | 
						|
    steps:
 | 
						|
      - name: Checkout
 | 
						|
        uses: actions/checkout@v5
 | 
						|
      - 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: 7.0
 | 
						|
          global-json-file: ./subdirectory/global.json
 | 
						|
      - name: Verify dotnet
 | 
						|
        shell: pwsh
 | 
						|
        run: __tests__/verify-dotnet.ps1 -Patterns "^6.0", "^7.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@v5
 | 
						|
      - name: Clear toolcache
 | 
						|
        shell: pwsh
 | 
						|
        run: __tests__/clear-toolcache.ps1 ${{ runner.os }}
 | 
						|
      - name: Write global.json
 | 
						|
        shell: bash
 | 
						|
        run: |
 | 
						|
          mkdir subdirectory
 | 
						|
          echo '{"sdk":{"version": "8.0.402","rollForward": "latestFeature"}}' > ./subdirectory/global.json
 | 
						|
      - name: Setup dotnet
 | 
						|
        uses: ./
 | 
						|
        with:
 | 
						|
          dotnet-version: '9.0'
 | 
						|
          global-json-file: ./subdirectory/global.json
 | 
						|
      - name: Verify dotnet
 | 
						|
        shell: pwsh
 | 
						|
        run: __tests__/verify-dotnet.ps1 -Patterns "^8.0", "^9.0"
 | 
						|
 | 
						|
  test-setup-global-json-only:
 | 
						|
    runs-on: ${{ matrix.operating-system }}
 | 
						|
    strategy:
 | 
						|
      fail-fast: false
 | 
						|
      matrix:
 | 
						|
        operating-system: [ubuntu-22.04, windows-latest, macos-13]
 | 
						|
    steps:
 | 
						|
      - name: Checkout
 | 
						|
        uses: actions/checkout@v5
 | 
						|
      - 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-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@v5
 | 
						|
      - 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:
 | 
						|
    runs-on: ${{ matrix.operating-system }}
 | 
						|
    strategy:
 | 
						|
      fail-fast: false
 | 
						|
      matrix:
 | 
						|
        operating-system: [ubuntu-22.04, windows-latest, macos-13]
 | 
						|
    steps:
 | 
						|
      - name: Checkout
 | 
						|
        uses: actions/checkout@v5
 | 
						|
      - 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-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@v5
 | 
						|
      - 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": "8.0.402","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 "^8.0"
 | 
						|
 | 
						|
  test-setup-with-dotnet-quality:
 | 
						|
    runs-on: ${{ matrix.operating-system }}
 | 
						|
    strategy:
 | 
						|
      fail-fast: false
 | 
						|
      matrix:
 | 
						|
        operating-system:
 | 
						|
          [ubuntu-latest, windows-latest, macos-13, macos-latest]
 | 
						|
    steps:
 | 
						|
      - name: Checkout
 | 
						|
        uses: actions/checkout@v5
 | 
						|
      - name: Clear toolcache
 | 
						|
        shell: pwsh
 | 
						|
        run: __tests__/clear-toolcache.ps1 ${{ runner.os }}
 | 
						|
 | 
						|
      - name: Setup dotnet 7.0 with preview quality
 | 
						|
        uses: ./
 | 
						|
        with:
 | 
						|
          dotnet-version: '7.0'
 | 
						|
          dotnet-quality: 'preview'
 | 
						|
      - name: Verify dotnet
 | 
						|
        shell: pwsh
 | 
						|
        run: __tests__/verify-dotnet.ps1 -Patterns "^7\.0\.\d+-"
 | 
						|
 | 
						|
  test-setup-with-cache:
 | 
						|
    runs-on: ${{ matrix.operating-system }}
 | 
						|
    strategy:
 | 
						|
      fail-fast: false
 | 
						|
      matrix:
 | 
						|
        operating-system: [ubuntu-22.04, windows-latest, macos-13]
 | 
						|
    env:
 | 
						|
      NUGET_PACKAGES: ${{ github.workspace }}/.nuget/packages
 | 
						|
    steps:
 | 
						|
      - name: Checkout
 | 
						|
        uses: actions/checkout@v5
 | 
						|
      - 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 6.0
 | 
						|
        id: setup-dotnet
 | 
						|
        uses: ./
 | 
						|
        with:
 | 
						|
          dotnet-version: 6.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 "^6.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@v5
 | 
						|
      - 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:
 | 
						|
    runs-on: ${{ matrix.operating-system }}
 | 
						|
    strategy:
 | 
						|
      fail-fast: false
 | 
						|
      matrix:
 | 
						|
        operating-system: [ubuntu-22.04, windows-latest, macos-13]
 | 
						|
    env:
 | 
						|
      NUGET_PACKAGES: ${{ github.workspace }}/.nuget/packages
 | 
						|
    steps:
 | 
						|
      - name: Checkout
 | 
						|
        uses: actions/checkout@v5
 | 
						|
      - name: Clear toolcache
 | 
						|
        shell: pwsh
 | 
						|
        run: __tests__/clear-toolcache.ps1 ${{ runner.os }}
 | 
						|
      - name: Setup .NET Core 6.0
 | 
						|
        id: setup-dotnet
 | 
						|
        uses: ./
 | 
						|
        with:
 | 
						|
          dotnet-version: 6.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 "^6.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@v5
 | 
						|
      - 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:
 | 
						|
    runs-on: ${{ matrix.operating-system }}
 | 
						|
    strategy:
 | 
						|
      fail-fast: false
 | 
						|
      matrix:
 | 
						|
        operating-system:
 | 
						|
          [ubuntu-latest, windows-latest, macos-13, macos-latest]
 | 
						|
    steps:
 | 
						|
      - name: Checkout
 | 
						|
        uses: actions/checkout@v5
 | 
						|
      - name: Clear toolcache
 | 
						|
        shell: pwsh
 | 
						|
        run: __tests__/clear-toolcache.ps1 ${{ runner.os }}
 | 
						|
 | 
						|
      - name: Setup dotnet 8.0.402
 | 
						|
        uses: ./
 | 
						|
        id: step1
 | 
						|
        with:
 | 
						|
          dotnet-version: '8.0.402'
 | 
						|
 | 
						|
      - 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:
 | 
						|
    runs-on: ${{ matrix.operating-system }}
 | 
						|
    strategy:
 | 
						|
      fail-fast: false
 | 
						|
      matrix:
 | 
						|
        operating-system:
 | 
						|
          [ubuntu-latest, windows-latest, macos-13, macos-latest]
 | 
						|
    steps:
 | 
						|
      - name: Checkout
 | 
						|
        uses: actions/checkout@v5
 | 
						|
      - name: Clear toolcache
 | 
						|
        shell: pwsh
 | 
						|
        run: __tests__/clear-toolcache.ps1 ${{ runner.os }}
 | 
						|
 | 
						|
      - name: Setup dotnet 8.0.402, 6.0.401, 7.0.100-rc.1.22431.12
 | 
						|
        uses: ./
 | 
						|
        id: step2
 | 
						|
        with:
 | 
						|
          dotnet-version: |
 | 
						|
            8.0.402
 | 
						|
            6.0.401
 | 
						|
            7.0.100-rc.1.22431.12
 | 
						|
 | 
						|
      - name: Verify value of the dotnet-version output
 | 
						|
        shell: pwsh
 | 
						|
        run: |
 | 
						|
          $version = "8.0.402"
 | 
						|
          if (-not ($version -eq '${{steps.step2.outputs.dotnet-version}}')) { throw "Unexpected output value" }
 | 
						|
 | 
						|
  test-proxy:
 | 
						|
    runs-on: ubuntu-22.04
 | 
						|
    container:
 | 
						|
      image: ubuntu:22.04
 | 
						|
      options: --dns 127.0.0.1
 | 
						|
    services:
 | 
						|
      squid-proxy:
 | 
						|
        image: ubuntu/squid:latest
 | 
						|
        ports:
 | 
						|
          - 3128:3128
 | 
						|
    env:
 | 
						|
      https_proxy: http://squid-proxy:3128
 | 
						|
      http_proxy: http://squid-proxy:3128
 | 
						|
    steps:
 | 
						|
      - name: Checkout
 | 
						|
        uses: actions/checkout@v5
 | 
						|
      - name: Install Powershell
 | 
						|
        run: |
 | 
						|
          apt-get update
 | 
						|
          apt-get install -y wget apt-transport-https software-properties-common
 | 
						|
          wget -q "https://packages.microsoft.com/config/ubuntu/$(lsb_release -rs)/packages-microsoft-prod.deb"
 | 
						|
          dpkg -i packages-microsoft-prod.deb
 | 
						|
          rm packages-microsoft-prod.deb
 | 
						|
          apt-get update
 | 
						|
          apt-get install -y powershell
 | 
						|
      - name: Clear toolcache
 | 
						|
        shell: pwsh
 | 
						|
        run: __tests__/clear-toolcache.ps1 ${{ runner.os }}
 | 
						|
      - name: Setup dotnet 8.0
 | 
						|
        uses: ./
 | 
						|
        with:
 | 
						|
          dotnet-version: 8.0
 | 
						|
          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" -CheckNugetConfig
 | 
						|
 | 
						|
  test-bypass-proxy:
 | 
						|
    runs-on: ubuntu-22.04
 | 
						|
    env:
 | 
						|
      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
 | 
						|
    steps:
 | 
						|
      - name: Checkout
 | 
						|
        uses: actions/checkout@v5
 | 
						|
      - name: Clear toolcache
 | 
						|
        shell: pwsh
 | 
						|
        run: __tests__/clear-toolcache.ps1 ${{ runner.os }}
 | 
						|
      - name: Setup dotnet 7.0.410
 | 
						|
        uses: ./
 | 
						|
        with:
 | 
						|
          dotnet-version: 7.0.410
 | 
						|
          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 "^7.0.410$" -CheckNugetConfig
 | 
						|
 | 
						|
  test-bypass-proxy-extended:
 | 
						|
    runs-on: ubuntu-latest
 | 
						|
    env:
 | 
						|
      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
 | 
						|
    steps:
 | 
						|
      - name: Checkout
 | 
						|
        uses: actions/checkout@v5
 | 
						|
      - name: Clear toolcache
 | 
						|
        shell: pwsh
 | 
						|
        run: __tests__/clear-toolcache.ps1 ${{ runner.os }}
 | 
						|
      - name: Setup dotnet 8.0.402
 | 
						|
        uses: ./
 | 
						|
        with:
 | 
						|
          dotnet-version: 8.0.402
 | 
						|
          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$" -CheckNugetConfig
 | 
						|
 | 
						|
  test-sequential-version-installation:
 | 
						|
    runs-on: ${{ matrix.operating-system }}
 | 
						|
    strategy:
 | 
						|
      fail-fast: false
 | 
						|
      matrix:
 | 
						|
        operating-system: [ubuntu-22.04, windows-latest, macos-13]
 | 
						|
        lower-version: ['6.0.427']
 | 
						|
        higher-version: ['7.0.203']
 | 
						|
    steps:
 | 
						|
      - name: Checkout
 | 
						|
        uses: actions/checkout@v5
 | 
						|
      - 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: ['8.0.403']
 | 
						|
        higher-version: ['9.0.301']
 | 
						|
    steps:
 | 
						|
      - name: Checkout
 | 
						|
        uses: actions/checkout@v5
 | 
						|
      - 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 }}$"
 |