Skip to content

Commit

Permalink
Upgrade to .NET 8
Browse files Browse the repository at this point in the history
  • Loading branch information
gabrielweyer committed Nov 18, 2023
1 parent 1008aac commit 79af5d1
Show file tree
Hide file tree
Showing 9 changed files with 21 additions and 9 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/coster.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@ jobs:
uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-dotnet@v3
name: Install .NET 8
with:
dotnet-version: '8.0.x'
dotnet-quality: 'ga'
- name: Build
run: ./build.sh
- name: Upload test results
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/security-scanning-csharp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,12 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v3

- name: Install .NET 8
uses: actions/setup-dotnet@v3
with:
dotnet-version: '8.0.x'
dotnet-quality: 'ga'

- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ Price `VMs` using the `JSON` pricing files generated by the `Parser`. The `Coste

### Coster pre-requisites

- [.NET SDK 6.x][dotnet-sdk]
- [.NET SDK 8.x][dotnet-sdk]

### Coster usage

Expand Down Expand Up @@ -222,7 +222,7 @@ The `Coster` will generate a `CSV` file in the `Out\` directory with the followi
[european-union]: https://europa.eu/european-union/about-eu/countries_en#tab-0-0
[swizerland-official-languages]: https://en.wikipedia.org/wiki/Switzerland#Languages
[azure-china]: https://www.azure.cn/en-us/pricing/details/virtual-machines/
[dotnet-sdk]: https://dotnet.microsoft.com/download/dotnet/6.0
[dotnet-sdk]: https://dotnet.microsoft.com/download/dotnet/8.0
[github-actions-parser-shield]: https://github.com/gabrielweyer/azure-vm-pricing/actions/workflows/parser.yml/badge.svg
[github-actions-parser]: https://github.com/gabrielweyer/azure-vm-pricing/actions/workflows/parser.yml
[github-actions-coster-shield]: https://github.com/gabrielweyer/azure-vm-pricing/actions/workflows/coster.yml/badge.svg
Expand Down
4 changes: 2 additions & 2 deletions coster/.nuke/build.schema.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Build Schema",
"$ref": "#/definitions/build",
"title": "Build Schema",
"definitions": {
"build": {
"type": "object",
Expand Down Expand Up @@ -113,4 +113,4 @@
}
}
}
}
}
2 changes: 1 addition & 1 deletion coster/build/Build.cs
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ from framework in testProject.GetTargetFrameworks()
.Executes(() =>
{
ReportGeneratorTasks.ReportGenerator(s => s
.SetFramework("net6.0")
.SetFramework("net8.0")
.SetReports($"{TestResultsDirectory}/**/coverage.cobertura.xml")
.SetTargetDirectory(CodeCoverageDirectory)
.SetReportTypes(ReportTypes.Html));
Expand Down
3 changes: 2 additions & 1 deletion coster/build/_build.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<RootNamespace>Gabo</RootNamespace>
<NoWarn>CS0649;CS0169;CA1707</NoWarn>
<NukeRootDirectory>..</NukeRootDirectory>
<NukeScriptDirectory>..</NukeScriptDirectory>
<NukeTelemetryVersion>1</NukeTelemetryVersion>
<EnableUnsafeBinaryFormatterSerialization>true</EnableUnsafeBinaryFormatterSerialization>
</PropertyGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion coster/src/AzureVmCoster/AzureVmCoster.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<OutputType>Exe</OutputType>
<LangVersion>latest</LangVersion>
<ImplicitUsings>enable</ImplicitUsings>
Expand Down
2 changes: 1 addition & 1 deletion coster/src/AzureVmCoster/Services/VmPricingParser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public List<VmPricing> Parse()

var fileVmPricing = JsonSerializer.Deserialize<List<VmPricing>>(File.ReadAllText(pricingFile));

if (fileVmPricing == null || !fileVmPricing.Any())
if (fileVmPricing == null || fileVmPricing.Count == 0)
{
continue;
}
Expand Down
2 changes: 1 addition & 1 deletion coster/tests/AzureVmCosterTests/AzureVmCosterTests.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<LangVersion>latest</LangVersion>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
Expand Down

0 comments on commit 79af5d1

Please sign in to comment.