Use latest dotnet version

This commit is contained in:
Zachary Eisinger 2020-04-14 13:30:22 -07:00
parent 0a20e2022d
commit 6192e4aa76
4 changed files with 17 additions and 17 deletions

View File

@ -39,16 +39,16 @@ jobs:
uses: actions/checkout@v2 uses: actions/checkout@v2
- name: Clear tool cache - name: Clear tool cache
run: mv "${{ runner.tool_cache }}" "${{ runner.tool_cache }}.old" run: mv "${{ runner.tool_cache }}" "${{ runner.tool_cache }}.old"
- name: Setup dotnet 3.0.100 - name: Setup dotnet 3.1.201
uses: ./ uses: ./
with: with:
dotnet-version: 3.0.100 dotnet-version: 3.1.201
- name: Verify dotnet - name: Verify dotnet
if: runner.os != 'windows' if: runner.os != 'windows'
run: __tests__/verify-dotnet.sh 3.0.100 run: __tests__/verify-dotnet.sh 3.1.201
- name: Verify dotnet (Windows) - name: Verify dotnet (Windows)
if: runner.os == 'windows' if: runner.os == 'windows'
run: __tests__/verify-dotnet.ps1 3.0.100 run: __tests__/verify-dotnet.ps1 3.1.201
test-proxy: test-proxy:
runs-on: ubuntu-latest runs-on: ubuntu-latest
@ -67,12 +67,12 @@ jobs:
uses: actions/checkout@v2 uses: actions/checkout@v2
- name: Clear tool cache - name: Clear tool cache
run: rm -rf $RUNNER_TOOL_CACHE/* run: rm -rf $RUNNER_TOOL_CACHE/*
- name: Setup dotnet 3.0.100 - name: Setup dotnet 3.1.201
uses: ./ uses: ./
with: with:
dotnet-version: 3.0.100 dotnet-version: 3.1.201
- name: Verify dotnet - name: Verify dotnet
run: __tests__/verify-dotnet.sh 3.0.100 run: __tests__/verify-dotnet.sh 3.1.201
test-bypass-proxy: test-bypass-proxy:
runs-on: ubuntu-latest runs-on: ubuntu-latest
@ -84,9 +84,9 @@ jobs:
uses: actions/checkout@v2 uses: actions/checkout@v2
- name: Clear tool cache - name: Clear tool cache
run: mv "${{ runner.tool_cache }}" "${{ runner.tool_cache }}.old" run: mv "${{ runner.tool_cache }}" "${{ runner.tool_cache }}.old"
- name: Setup dotnet 3.0.100 - name: Setup dotnet 3.1.201
uses: ./ uses: ./
with: with:
dotnet-version: 3.0.100 dotnet-version: 3.1.201
- name: Verify dotnet - name: Verify dotnet
run: __tests__/verify-dotnet.sh 3.0.100 run: __tests__/verify-dotnet.sh 3.1.201

View File

@ -20,7 +20,7 @@ steps:
- uses: actions/checkout@master - uses: actions/checkout@master
- uses: actions/setup-dotnet@v1 - uses: actions/setup-dotnet@v1
with: with:
dotnet-version: '3.1.100' # SDK Version to use. dotnet-version: '3.1.201' # SDK Version to use.
- run: dotnet build <my project> - run: dotnet build <my project>
``` ```
@ -31,7 +31,7 @@ jobs:
runs-on: ubuntu-16.04 runs-on: ubuntu-16.04
strategy: strategy:
matrix: matrix:
dotnet: [ '2.2.103', '3.0.100', '3.1.100' ] dotnet: [ '2.2.103', '3.1.201' ]
name: Dotnet ${{ matrix.dotnet }} sample name: Dotnet ${{ matrix.dotnet }} sample
steps: steps:
- uses: actions/checkout@master - uses: actions/checkout@master
@ -49,7 +49,7 @@ steps:
# Authenticates packages to push to GPR # Authenticates packages to push to GPR
- uses: actions/setup-dotnet@v1 - uses: actions/setup-dotnet@v1
with: with:
dotnet-version: '3.1.100' # SDK Version to use. dotnet-version: '3.1.201' # SDK Version to use.
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}}

View File

@ -29,8 +29,8 @@ describe('installer tests', () => {
}, 30000); }, 30000);
it('Acquires version of dotnet if no matching version is installed', async () => { it('Acquires version of dotnet if no matching version is installed', async () => {
await getDotnet('3.1.100'); await getDotnet('3.1.201');
expect(fs.existsSync(path.join(toolDir, 'sdk', '3.1.100'))).toBe(true); expect(fs.existsSync(path.join(toolDir, 'sdk', '3.1.201'))).toBe(true);
if (IS_WINDOWS) { if (IS_WINDOWS) {
expect(fs.existsSync(path.join(toolDir, 'dotnet.exe'))).toBe(true); expect(fs.existsSync(path.join(toolDir, 'dotnet.exe'))).toBe(true);
} else { } else {

View File

@ -31,13 +31,13 @@ describe('setup-dotnet tests', () => {
it('Acquires version of dotnet if no matching version is installed', async () => { it('Acquires version of dotnet if no matching version is installed', async () => {
const globalJsonPath = path.join(process.cwd(), 'global.json'); const globalJsonPath = path.join(process.cwd(), 'global.json');
const jsonContents = `{${os.EOL}"sdk": {${os.EOL}"version": "3.1.100"${os.EOL}}${os.EOL}}`; const jsonContents = `{${os.EOL}"sdk": {${os.EOL}"version": "3.1.201"${os.EOL}}${os.EOL}}`;
if (!fs.existsSync(globalJsonPath)) { if (!fs.existsSync(globalJsonPath)) {
fs.writeFileSync(globalJsonPath, jsonContents); fs.writeFileSync(globalJsonPath, jsonContents);
} }
await setup.run(); await setup.run();
expect(fs.existsSync(path.join(toolDir, 'sdk', '3.1.100'))).toBe(true); expect(fs.existsSync(path.join(toolDir, 'sdk', '3.1.201'))).toBe(true);
if (IS_WINDOWS) { if (IS_WINDOWS) {
expect(fs.existsSync(path.join(toolDir, 'dotnet.exe'))).toBe(true); expect(fs.existsSync(path.join(toolDir, 'dotnet.exe'))).toBe(true);
} else { } else {