Skip to content

Commit 1e101d8

Browse files
committed
ci: revert eb53cca 1c72642 227e62e
1 parent 795c18c commit 1e101d8

File tree

3 files changed

+90
-96
lines changed

3 files changed

+90
-96
lines changed

.github/workflows/dotnetcore.yml

Lines changed: 50 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -1,57 +1,60 @@
11
name: Build, test and publish
2-
3-
on:
2+
"on":
43
push:
5-
branches: [ master ]
4+
branches:
5+
- master
66
pull_request:
7-
branches: [ master ]
8-
7+
branches:
8+
- master
99
env:
1010
config: Release
1111
PackageOutputPath: nupkg
12-
1312
jobs:
1413
build-test-publish:
1514
runs-on: windows-latest
1615
steps:
17-
- uses: actions/checkout@v2
18-
- name: Setup .NET Core and GitHub Packages
19-
uses: actions/setup-dotnet@v1
20-
with:
21-
dotnet-version: 3.1.101
22-
source-url: https://nuget.pkg.github.com/octokit/index.json
23-
env:
24-
NUGET_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
25-
- name: Setup NuGet
26-
uses: nuget/setup-nuget@v1
27-
with:
28-
nuget-version: '5.x'
29-
30-
- name: Build using .NET Core
31-
run: dotnet build Octokit.GraphQL.sln -c ${{ env.config }}
32-
33-
- name: Run Octokit.GraphQL.UnitTests
34-
run: dotnet test -c ${{ env.config }} --no-build .\Octokit.GraphQL.UnitTests\Octokit.GraphQL.UnitTests.csproj # /p:CollectCoverage=true /p:CoverletOutputFormat=opencover /p:Exclude="[Octokit.GraphQL]Octokit.GraphQL.*"
35-
- name: Run Octokit.GraphQL.Core.UnitTests
36-
run: dotnet test -c ${{ env.config }} --no-build .\Octokit.GraphQL.Core.UnitTests\Octokit.GraphQL.Core.UnitTests.csproj # /p:CollectCoverage=true /p:CoverletOutputFormat=opencover /p:Exclude="[Octokit.GraphQL]Octokit.GraphQL.*"
37-
- name: Run Octokit.GraphQL.Core.Generation.UnitTests
38-
run: dotnet test -c ${{ env.config }} --no-build .\Octokit.GraphQL.Core.Generation.UnitTests\Octokit.GraphQL.Core.Generation.UnitTests.csproj # /p:CollectCoverage=true /p:CoverletOutputFormat=opencover /p:Exclude="[Octokit.GraphQL]Octokit.GraphQL.*"
39-
40-
- name: Create package using .nuspec
41-
run: dotnet pack Octokit.GraphQL.Pack/Octokit.GraphQL.Pack.csproj --output ${{ env.PackageOutputPath }}
42-
43-
- name: Upload nupkg artifact
44-
uses: actions/upload-artifact@v2
45-
with:
46-
name: nupkg
47-
path: ${{ env.PackageOutputPath }}/*.nupkg
48-
49-
- name: Publish to GitHub Packages
50-
if: github.ref == 'refs/heads/master'
51-
shell: bash
52-
run: dotnet nuget push ${{ env.PackageOutputPath }}/*.nupkg
53-
54-
- name: Publish to nuget.org
55-
if: github.ref == 'refs/heads/master'
56-
shell: bash
57-
run: dotnet nuget push ${{ env.PackageOutputPath }}/*.nupkg --source nuget.org -k ${{ secrets.NUGET_TOKEN }}
16+
- uses: actions/checkout@v3
17+
- name: Setup .NET Core and GitHub Packages
18+
uses: actions/setup-dotnet@v1
19+
with:
20+
dotnet-version: 3.1.101
21+
source-url: https://nuget.pkg.github.com/octokit/index.json
22+
env:
23+
NUGET_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
24+
- name: Setup NuGet
25+
uses: nuget/setup-nuget@v1
26+
with:
27+
nuget-version: 5.x
28+
- name: Build using .NET Core
29+
run: dotnet build Octokit.GraphQL.sln -c ${{ env.config }}
30+
- name: Run Octokit.GraphQL.UnitTests
31+
run: >-
32+
dotnet test -c ${{ env.config }} --no-build
33+
.\Octokit.GraphQL.UnitTests\Octokit.GraphQL.UnitTests.csproj
34+
- name: Run Octokit.GraphQL.Core.UnitTests
35+
run: >-
36+
dotnet test -c ${{ env.config }} --no-build
37+
.\Octokit.GraphQL.Core.UnitTests\Octokit.GraphQL.Core.UnitTests.csproj
38+
- name: Run Octokit.GraphQL.Core.Generation.UnitTests
39+
run: >-
40+
dotnet test -c ${{ env.config }} --no-build
41+
.\Octokit.GraphQL.Core.Generation.UnitTests\Octokit.GraphQL.Core.Generation.UnitTests.csproj
42+
- name: Create package using .nuspec
43+
run: >-
44+
dotnet pack Octokit.GraphQL.Pack/Octokit.GraphQL.Pack.csproj --output
45+
${{ env.PackageOutputPath }}
46+
- name: Upload nupkg artifact
47+
uses: actions/upload-artifact@v2
48+
with:
49+
name: nupkg
50+
path: ${{ env.PackageOutputPath }}/*.nupkg
51+
- name: Publish to GitHub Packages
52+
if: github.ref == 'refs/heads/master'
53+
shell: bash
54+
run: dotnet nuget push ${{ env.PackageOutputPath }}/*.nupkg
55+
- name: Publish to nuget.org
56+
if: github.ref == 'refs/heads/master'
57+
shell: bash
58+
run: >-
59+
dotnet nuget push ${{ env.PackageOutputPath }}/*.nupkg --source
60+
nuget.org -k ${{ secrets.NUGET_TOKEN }}
Lines changed: 19 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,27 @@
11
name: Test Generate Schema
2-
3-
on:
2+
"on":
43
push:
5-
branches: [ master ]
4+
branches:
5+
- master
66
pull_request:
7-
branches: [ master ]
7+
branches:
8+
- master
89
schedule:
9-
- cron: "0 0 * * *" # Run at 00:00 UTC everyday
10-
10+
- cron: 0 0 * * *
1111
jobs:
1212
build:
1313
runs-on: ubuntu-latest
14-
1514
steps:
16-
- uses: actions/checkout@v2
17-
18-
- name: Setup .NET Core
19-
uses: actions/setup-dotnet@v1
20-
with:
21-
dotnet-version: 3.1.x
22-
23-
- name: Install dependencies
24-
run: dotnet restore
25-
26-
- name: Generate
27-
run: dotnet run --project ./Tools/Generate/Generate.csproj -- ${{ github.token }} ./Octokit.GraphQL/
28-
29-
- name: Build
30-
run: dotnet build
15+
- uses: actions/checkout@v3
16+
- name: Setup .NET Core
17+
uses: actions/setup-dotnet@v1
18+
with:
19+
dotnet-version: 3.1.x
20+
- name: Install dependencies
21+
run: dotnet restore
22+
- name: Generate
23+
run: >-
24+
dotnet run --project ./Tools/Generate/Generate.csproj -- ${{
25+
github.token }} ./Octokit.GraphQL/
26+
- name: Build
27+
run: dotnet build
Lines changed: 21 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,30 @@
11
name: Integration tests
2-
3-
on:
4-
push:
5-
6-
# Runs at 00:00 UTC every day
2+
"on":
3+
push: null
74
schedule:
8-
- cron: '0 */24 * * *'
9-
10-
# Runs when repository is starred
5+
- cron: 0 */24 * * *
116
watch:
12-
types: [started]
13-
7+
types:
8+
- started
149
env:
1510
config: Release
16-
1711
jobs:
1812
integration-tests:
1913
runs-on: windows-latest
20-
2114
steps:
22-
- uses: actions/checkout@v2
23-
24-
- name: Setup .NET Core
25-
uses: actions/setup-dotnet@v1
26-
with:
27-
dotnet-version: 3.1.101
28-
29-
- name: Build using .NET Core
30-
run: dotnet build Octokit.GraphQL.sln -c ${{ env.config }}
31-
32-
- name: Run integration tests
33-
run: dotnet test -c ${{ env.config }} --no-build /p:CollectCoverage=true /p:CoverletOutputFormat=opencover /p:Exclude="[Octokit.GraphQL]Octokit.GraphQL.*" .\Octokit.GraphQL.IntegrationTests\Octokit.GraphQL.IntegrationTests.csproj
34-
env:
35-
OCTOKIT_GQL_OAUTHTOKEN: "${{ secrets.OCTOKIT_GQL_OAUTHTOKEN }}"
36-
OCTOKIT_GQL_GITHUBUSERNAME: "${{ secrets.OCTOKIT_GQL_GITHUBUSERNAME }}"
15+
- uses: actions/checkout@v3
16+
- name: Setup .NET Core
17+
uses: actions/setup-dotnet@v1
18+
with:
19+
dotnet-version: 3.1.101
20+
- name: Build using .NET Core
21+
run: dotnet build Octokit.GraphQL.sln -c ${{ env.config }}
22+
- name: Run integration tests
23+
run: >-
24+
dotnet test -c ${{ env.config }} --no-build /p:CollectCoverage=true
25+
/p:CoverletOutputFormat=opencover
26+
/p:Exclude="[Octokit.GraphQL]Octokit.GraphQL.*"
27+
.\Octokit.GraphQL.IntegrationTests\Octokit.GraphQL.IntegrationTests.csproj
28+
env:
29+
OCTOKIT_GQL_OAUTHTOKEN: ${{ secrets.OCTOKIT_GQL_OAUTHTOKEN }}
30+
OCTOKIT_GQL_GITHUBUSERNAME: ${{ secrets.OCTOKIT_GQL_GITHUBUSERNAME }}

0 commit comments

Comments
 (0)