Skip to content

Commit

Permalink
Merge pull request #497 from fabiankachlock/ZWOO-412-update-dotnet-8
Browse files Browse the repository at this point in the history
ZWOO-412 update to dotnet 8
  • Loading branch information
fabiankachlock authored Nov 15, 2023
2 parents c709bbb + 8a7a15d commit 8774dc5
Show file tree
Hide file tree
Showing 21 changed files with 124 additions and 86 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci-cd-backend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: "7.0.x"
dotnet-version: "8"
- name: Install dependencies
working-directory: ./backend
run: dotnet restore "./ZwooBackend/ZwooBackend.csproj"
Expand All @@ -35,7 +35,7 @@ jobs:
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: "7.0.x"
dotnet-version: "8"
- name: Install dependencies
working-directory: ./backend
run: dotnet restore "./ZwooInfoDashBoard/ZwooInfoDashBoard.csproj"
Expand All @@ -50,7 +50,7 @@ jobs:
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: "7.0.x"
dotnet-version: "8"
- name: Install workloads
working-directory: ./backend
run: dotnet workload restore
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci-cd-frontend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: "7.0.x"
dotnet-version: "8"
- name: Install dotnet wasm-tools
run: dotnet workload install wasm-tools
- name: Setup
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tauri-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: "7.0.x"
dotnet-version: "8"
- name: Install dotnet wasm-tools
run: dotnet workload install wasm-tools
- name: install app dependencies and build it
Expand Down
6 changes: 3 additions & 3 deletions backend/BackendHelper/BackendHelper.csproj
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<LangVersion>11</LangVersion>
<LangVersion>12</LangVersion>
</PropertyGroup>

</Project>
</Project>
4 changes: 2 additions & 2 deletions backend/DebugDockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
FROM mcr.microsoft.com/dotnet/aspnet:7.0 AS base
FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS base
WORKDIR /app
EXPOSE 80
EXPOSE 443

FROM mcr.microsoft.com/dotnet/sdk:7.0 AS build
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build
WORKDIR /src

# copy project configs into /src/<project>/<config>.csproj
Expand Down
4 changes: 2 additions & 2 deletions backend/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
FROM mcr.microsoft.com/dotnet/aspnet:7.0 AS base
FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS base
WORKDIR /app
EXPOSE 80
EXPOSE 443

FROM mcr.microsoft.com/dotnet/sdk:7.0 AS build
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build
WORKDIR /src

# copy project configs into /src/<project>/<config>.csproj
Expand Down
4 changes: 2 additions & 2 deletions backend/DockerfileDashboard
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
FROM mcr.microsoft.com/dotnet/aspnet:7.0 AS base
FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS base
WORKDIR /app
EXPOSE 80
EXPOSE 443

FROM mcr.microsoft.com/dotnet/sdk:7.0 AS build
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build
WORKDIR /src
COPY ["./ZwooInfoDashBoard/ZwooInfoDashBoard.csproj", "./ZwooInfoDashBoard/"]
COPY ["./ZwooDatabase/ZwooDatabase.csproj", "./ZwooDatabase/"]
Expand Down
10 changes: 5 additions & 5 deletions backend/GameLogic.Tests/GameLogic.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>

<LangVersion>12</LangVersion>
<IsPackable>false</IsPackable>
</PropertyGroup>

Expand All @@ -21,8 +21,8 @@
</PackageReference>
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\GameLogic\GameLogic.csproj" />
<ItemGroup>
<ProjectReference Include="..\GameLogic\GameLogic.csproj" />
</ItemGroup>

</Project>
</Project>
4 changes: 2 additions & 2 deletions backend/GameLogic/GameLogic.csproj
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<LangVersion>11</LangVersion>
<LangVersion>12</LangVersion>
</PropertyGroup>

</Project>
2 changes: 1 addition & 1 deletion backend/Zwoo.MongoMigrations/Zwoo.MongoMigrations.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
Expand Down
4 changes: 2 additions & 2 deletions backend/ZwooBackend/ZwooBackend.csproj
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>
<LangVersion>11</LangVersion>
<LangVersion>12</LangVersion>
<UserSecretsId>df0f8480-e01b-491d-979f-26d24210c259</UserSecretsId>
<NoWarn>NU1701</NoWarn>
</PropertyGroup>
Expand Down
4 changes: 2 additions & 2 deletions backend/ZwooDatabase/ZwooDatabase.csproj
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<LangVersion>11</LangVersion>
<LangVersion>12</LangVersion>
</PropertyGroup>

<ItemGroup>
Expand Down
6 changes: 3 additions & 3 deletions backend/ZwooInfoDashBoard/ZwooInfoDashBoard.csproj
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<LangVersion>11</LangVersion>
<LangVersion>12</LangVersion>
<DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>
<UserSecretsId>c0980794-5922-41af-876f-2b15b2bdcfd0</UserSecretsId>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Authentication.OpenIdConnect" Version="7.0.4" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.OpenIdConnect" Version="8.0.0" />
<PackageReference Include="log4net" Version="2.0.15" />
<PackageReference Include="MongoDB.Driver" Version="2.19.0" />
<PackageReference Include="Radzen.Blazor" Version="4.6.2" />
Expand Down
2 changes: 1 addition & 1 deletion backend/ZwooWasmAdapter/ZwooWasmAdapter.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<ProjectReference Include="..\GameLogic\GameLogic.csproj" />
</ItemGroup>
<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<RuntimeIdentifier>browser-wasm</RuntimeIdentifier>
<WasmMainJSPath>main.js</WasmMainJSPath>
Expand Down
16 changes: 8 additions & 8 deletions e2e/run-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,10 @@ echo "docker ready!"
# launch_app
# echo "running tests in electron..."
# if [ -n "$CY_KEY" ]; then
# docker run -i --name e2e-test-runner-electron --rm -v /app/frontend:/e2e -w /e2e --network host cypress/included:12.7.0 --record --key $CY_KEY
# docker run -i --name e2e-test-runner-electron --rm -v /app/frontend:/e2e -w /e2e --network host cypress/included:13.5.0 --record --key $CY_KEY
# else
# # dont record when the key is not supplied
# docker run -i --name e2e-test-runner-electron --rm -v /app/frontend:/e2e -w /e2e --network host cypress/included:12.7.0
# docker run -i --name e2e-test-runner-electron --rm -v /app/frontend:/e2e -w /e2e --network host cypress/included:13.5.0
# fi
# EL_EXIT_CODE=$?
# echo "electron tests ran!"
Expand All @@ -57,10 +57,10 @@ echo ""
launch_app
echo "running tests in chrome..."
if [ -n "$CY_KEY" ]; then
docker run -i --name e2e-test-runner-chrome --rm -v /app/frontend:/e2e -w /e2e --network host cypress/included:12.7.0 --browser chrome --record --key $CY_KEY
docker run -i --name e2e-test-runner-chrome --rm -v /app/frontend:/e2e -w /e2e --network host cypress/included:13.5.0 --browser chrome --record --key $CY_KEY
else
# dont record when the key is not supplied
docker run -i --name e2e-test-runner-chrome --rm -v /app/frontend:/e2e -w /e2e --network host cypress/included:12.7.0 --browser chrome
docker run -i --name e2e-test-runner-chrome --rm -v /app/frontend:/e2e -w /e2e --network host cypress/included:13.5.0 --browser chrome
fi
CH_EXIT_CODE=$?
cp /app/frontend/tests/e2e/screenshots /app/frontend/uploads/screenshots/chrome
Expand All @@ -74,10 +74,10 @@ echo ""
launch_app
echo "running tests in firefox..."
if [ -n "$CY_KEY" ]; then
docker run -i --name e2e-test-runner-firefox --rm -v /app/frontend:/e2e -w /e2e --network host cypress/included:12.7.0 --browser firefox --record --key $CY_KEY
docker run -i --name e2e-test-runner-firefox --rm -v /app/frontend:/e2e -w /e2e --network host cypress/included:13.5.0 --browser firefox --record --key $CY_KEY
else
# dont record when the key is not supplied
docker run -i --name e2e-test-runner-firefox --rm -v /app/frontend:/e2e -w /e2e --network host cypress/included:12.7.0 --browser firefox
docker run -i --name e2e-test-runner-firefox --rm -v /app/frontend:/e2e -w /e2e --network host cypress/included:13.5.0 --browser firefox
fi
FI_EXIT_CODE=$?
cp /app/frontend/tests/e2e/screenshots /app/frontend/uploads/screenshots/firefox
Expand All @@ -91,10 +91,10 @@ echo ""
launch_app
echo "running tests in edge..."
if [ -n "$CY_KEY" ]; then
docker run -i --name e2e-test-runner-edge --rm -v /app/frontend:/e2e -w /e2e --network host cypress/included:12.7.0 --browser edge --record --key $CY_KEY
docker run -i --name e2e-test-runner-edge --rm -v /app/frontend:/e2e -w /e2e --network host cypress/included:13.5.0 --browser edge --record --key $CY_KEY
else
# dont record when the key is not supplied
docker run -i --name e2e-test-runner-edge --rm -v /app/frontend:/e2e -w /e2e --network host cypress/included:12.7.0 --browser edge
docker run -i --name e2e-test-runner-edge --rm -v /app/frontend:/e2e -w /e2e --network host cypress/included:13.5.0 --browser edge
fi
ED_EXIT_CODE=$?
cp /app/frontend/tests/e2e/screenshots /app/frontend/uploads/screenshots/egde
Expand Down
3 changes: 2 additions & 1 deletion frontend/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,15 @@ RUN yarn
COPY ./frontend/ ./

### Build WASM
FROM mcr.microsoft.com/dotnet/sdk:7.0 AS dotnet-builder
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS dotnet-builder

# copy sources
COPY --from=base /src ./src
WORKDIR /src/backend

# install python
RUN apt-get update -y
RUN apt-get install -y libatomic1
RUN apt-get install -y python3

# install wasm tools
Expand Down
1 change: 1 addition & 0 deletions frontend/cypress.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ module.exports = defineConfig({
setupNodeEvents(on, config) {
return require('./tests/e2e/plugins/index.js')(on, config);
},

supportFile: 'tests/e2e/support/index.js',
specPattern: 'tests/e2e/specs/**/*.cy.{js,jsx,ts,tsx}'
}
Expand Down
2 changes: 1 addition & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
"autoprefixer": "^10",
"babel-jest": "^27",
"cross-env": "^7.0.3",
"cypress": "^12.7.0",
"cypress": "13.5.1",
"dependency-cruiser": "^15.1.1",
"eslint": "^8.51.0",
"eslint-config-prettier": "^8.5.0",
Expand Down
9 changes: 9 additions & 0 deletions frontend/tests/e2e/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"extends": "../../tsconfig.json",
"compilerOptions": {
"types": ["cypress"],
"sourceMap": false
},
"include": ["."],
"exclude": ["../../src"]
}
8 changes: 0 additions & 8 deletions frontend/tsconfig.spec.json

This file was deleted.

Loading

0 comments on commit 8774dc5

Please sign in to comment.