Skip to content

Commit 6454321

Browse files
authored
Combine, build test and publish
1 parent 4eda48d commit 6454321

File tree

1 file changed

+9
-31
lines changed

1 file changed

+9
-31
lines changed

.github/workflows/dotnetcore.yml

Lines changed: 9 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -10,36 +10,7 @@ env:
1010
config: Release
1111

1212
jobs:
13-
build:
14-
runs-on: windows-latest
15-
steps:
16-
- uses: actions/checkout@v2
17-
- name: Setup .NET Core and GitHub Packages
18-
uses: actions/setup-dotnet@v1
19-
with:
20-
dotnet-version: 3.1.101
21-
22-
- name: Build using .NET Core
23-
run: dotnet build Octokit.GraphQL.sln -c ${{ env.config }}
24-
test:
25-
needs: [build]
26-
runs-on: windows-latest
27-
steps:
28-
- uses: actions/checkout@v2
29-
- name: Setup .NET Core and GitHub Packages
30-
uses: actions/setup-dotnet@v1
31-
with:
32-
dotnet-version: 3.1.101
33-
34-
- name: Run Octokit.GraphQL.UnitTests
35-
run: dotnet test -c ${{ env.config }} --no-build /p:CollectCoverage=true /p:CoverletOutputFormat=opencover /p:Exclude="[Octokit.GraphQL]Octokit.GraphQL.*" .\Octokit.GraphQL.UnitTests\Octokit.GraphQL.UnitTests.csproj
36-
- name: Run Octokit.GraphQL.Core.UnitTests
37-
run: dotnet test -c ${{ env.config }} --no-build /p:CollectCoverage=true /p:CoverletOutputFormat=opencover /p:Exclude="[Octokit.GraphQL]Octokit.GraphQL.*" .\Octokit.GraphQL.Core.UnitTests\Octokit.GraphQL.Core.UnitTests.csproj
38-
- name: Run Octokit.GraphQL.Core.Generation.UnitTests
39-
run: dotnet test -c ${{ env.config }} --no-build /p:CollectCoverage=true /p:CoverletOutputFormat=opencover /p:Exclude="[Octokit.GraphQL]Octokit.GraphQL.*" .\Octokit.GraphQL.Core.Generation.UnitTests\Octokit.GraphQL.Core.Generation.UnitTests.csproj
40-
publish:
41-
needs: [build,test]
42-
if: github.ref == 'refs/heads/master'
13+
build-test-publish:
4314
runs-on: windows-latest
4415
steps:
4516
- uses: actions/checkout@v2
@@ -56,7 +27,14 @@ jobs:
5627
nuget-version: '5.x'
5728

5829
- name: Build using .NET Core
59-
run: dotnet build Octokit.GraphQL.sln -c ${{ env.config }}
30+
run: dotnet build Octokit.GraphQL.sln -c ${{ env.config }}
31+
32+
- name: Run Octokit.GraphQL.UnitTests
33+
run: dotnet test -c ${{ env.config }} --no-build /p:CollectCoverage=true /p:CoverletOutputFormat=opencover /p:Exclude="[Octokit.GraphQL]Octokit.GraphQL.*" .\Octokit.GraphQL.UnitTests\Octokit.GraphQL.UnitTests.csproj
34+
- name: Run Octokit.GraphQL.Core.UnitTests
35+
run: dotnet test -c ${{ env.config }} --no-build /p:CollectCoverage=true /p:CoverletOutputFormat=opencover /p:Exclude="[Octokit.GraphQL]Octokit.GraphQL.*" .\Octokit.GraphQL.Core.UnitTests\Octokit.GraphQL.Core.UnitTests.csproj
36+
- name: Run Octokit.GraphQL.Core.Generation.UnitTests
37+
run: dotnet test -c ${{ env.config }} --no-build /p:CollectCoverage=true /p:CoverletOutputFormat=opencover /p:Exclude="[Octokit.GraphQL]Octokit.GraphQL.*" .\Octokit.GraphQL.Core.Generation.UnitTests\Octokit.GraphQL.Core.Generation.UnitTests.csproj
6038

6139
- name: Create NuGet package
6240
run: nuget pack

0 commit comments

Comments
 (0)