mirror of
https://github.com/irongut/CodeCoverageSummary.git
synced 2026-05-19 08:20:13 +02:00
merge PR #30 Update to .Net 6
This commit is contained in:
@@ -17,7 +17,7 @@ jobs:
|
|||||||
- name: Setup .Net
|
- name: Setup .Net
|
||||||
uses: actions/setup-dotnet@v1
|
uses: actions/setup-dotnet@v1
|
||||||
with:
|
with:
|
||||||
dotnet-version: 5.0.x
|
dotnet-version: 6.0.x
|
||||||
|
|
||||||
- name: Restore Dependencies
|
- name: Restore Dependencies
|
||||||
run: dotnet restore src/CodeCoverageSummary.sln
|
run: dotnet restore src/CodeCoverageSummary.sln
|
||||||
@@ -26,4 +26,4 @@ jobs:
|
|||||||
run: dotnet build src/CodeCoverageSummary.sln --configuration Release --no-restore
|
run: dotnet build src/CodeCoverageSummary.sln --configuration Release --no-restore
|
||||||
|
|
||||||
- name: Test with sample file
|
- name: Test with sample file
|
||||||
run: dotnet src/CodeCoverageSummary/bin/Release/net5.0/CodeCoverageSummary.dll --files src/coverage.cobertura.xml --badge true
|
run: dotnet src/CodeCoverageSummary/bin/Release/net6.0/CodeCoverageSummary.dll --files src/coverage.cobertura.xml --badge true
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ jobs:
|
|||||||
- name: Setup .Net
|
- name: Setup .Net
|
||||||
uses: actions/setup-dotnet@v1
|
uses: actions/setup-dotnet@v1
|
||||||
with:
|
with:
|
||||||
dotnet-version: 5.0.x
|
dotnet-version: 6.0.x
|
||||||
|
|
||||||
- name: Restore Dependencies
|
- name: Restore Dependencies
|
||||||
run: dotnet restore src/CodeCoverageSummary.sln
|
run: dotnet restore src/CodeCoverageSummary.sln
|
||||||
@@ -30,7 +30,7 @@ jobs:
|
|||||||
run: dotnet build src/CodeCoverageSummary.sln --configuration Release --no-restore
|
run: dotnet build src/CodeCoverageSummary.sln --configuration Release --no-restore
|
||||||
|
|
||||||
- name: Test with sample file
|
- name: Test with sample file
|
||||||
run: dotnet src/CodeCoverageSummary/bin/Release/net5.0/CodeCoverageSummary.dll src/coverage.cobertura.xml --badge true
|
run: dotnet src/CodeCoverageSummary/bin/Release/net6.0/CodeCoverageSummary.dll src/coverage.cobertura.xml --badge true
|
||||||
|
|
||||||
- name: Get Previous Tag
|
- name: Get Previous Tag
|
||||||
id: get_previous_tag
|
id: get_previous_tag
|
||||||
|
|||||||
+6
-7
@@ -1,11 +1,10 @@
|
|||||||
FROM mcr.microsoft.com/dotnet/sdk:5.0 AS build
|
FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build
|
||||||
|
COPY ["src/coverage.cobertura.xml", "/publish/sample.coverage.xml"]
|
||||||
WORKDIR /src
|
WORKDIR /src
|
||||||
COPY ["src/CodeCoverageSummary/CodeCoverageSummary.csproj", "CodeCoverageSummary/"]
|
COPY ["src/CodeCoverageSummary/CodeCoverageSummary.csproj", "CodeCoverageSummary/"]
|
||||||
RUN dotnet restore CodeCoverageSummary/CodeCoverageSummary.csproj
|
RUN dotnet restore CodeCoverageSummary/CodeCoverageSummary.csproj
|
||||||
COPY ["src/CodeCoverageSummary", "CodeCoverageSummary/"]
|
COPY ["src/CodeCoverageSummary", "CodeCoverageSummary/"]
|
||||||
COPY ["src/coverage.cobertura.xml", "sample.coverage.xml"]
|
RUN dotnet publish CodeCoverageSummary/CodeCoverageSummary.csproj --configuration Release --no-restore --output /publish
|
||||||
RUN dotnet build CodeCoverageSummary/CodeCoverageSummary.csproj --configuration Release --no-restore --output /app/build
|
|
||||||
RUN dotnet publish CodeCoverageSummary/CodeCoverageSummary.csproj --configuration Release --no-restore --output /app/publish
|
|
||||||
|
|
||||||
# Label the container
|
# Label the container
|
||||||
LABEL maintainer="Irongut <murray.dave@outlook.com>"
|
LABEL maintainer="Irongut <murray.dave@outlook.com>"
|
||||||
@@ -18,8 +17,8 @@ LABEL com.github.actions.description="A GitHub Action that reads Cobertura forma
|
|||||||
LABEL com.github.actions.icon="book-open"
|
LABEL com.github.actions.icon="book-open"
|
||||||
LABEL com.github.actions.color="purple"
|
LABEL com.github.actions.color="purple"
|
||||||
|
|
||||||
FROM mcr.microsoft.com/dotnet/runtime:5.0 AS final
|
FROM mcr.microsoft.com/dotnet/runtime:6.0 AS final
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
COPY --from=build /app/publish .
|
COPY --from=build /publish .
|
||||||
COPY --from=build /src/sample.coverage.xml .
|
ENV DOTNET_EnableDiagnostics=0
|
||||||
ENTRYPOINT ["dotnet", "/app/CodeCoverageSummary.dll"]
|
ENTRYPOINT ["dotnet", "/app/CodeCoverageSummary.dll"]
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<OutputType>Exe</OutputType>
|
<OutputType>Exe</OutputType>
|
||||||
<TargetFramework>net5.0</TargetFramework>
|
<TargetFramework>net6.0</TargetFramework>
|
||||||
<DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>
|
<DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>
|
||||||
<Company>Taranis Software</Company>
|
<Company>Taranis Software</Company>
|
||||||
<Authors>Irongut</Authors>
|
<Authors>Irongut</Authors>
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
},
|
},
|
||||||
"Docker": {
|
"Docker": {
|
||||||
"commandName": "Docker",
|
"commandName": "Docker",
|
||||||
"commandLineArgs": "/src/coverage.cobertura.xml --format=md --badge=true"
|
"commandLineArgs": "--files /app/sample.coverage.xml --format=text --badge=true"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user