Skip to content

Commit 60704ed

Browse files
authored
maint: Code Quality: Simplify directories, reworked workflows to use the new structure, cleaned up old files
Code Quality: Simplify directories
2 parents ccdd213 + 7d70bb2 commit 60704ed

File tree

1,713 files changed

+107
-179
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,713 files changed

+107
-179
lines changed

.github/workflows/dotnetcore.yml

Lines changed: 43 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,61 +1,69 @@
11
name: Build, test and publish
2-
"on":
2+
3+
on:
34
push:
45
branches:
56
- main
7+
paths-ignore:
8+
- 'docs/**'
9+
- '*.md'
610
pull_request:
7-
branches:
8-
- main
11+
paths-ignore:
12+
- 'docs/**'
13+
- '*.md'
914
workflow_dispatch:
15+
1016
env:
11-
config: Release
12-
PackageOutputPath: nupkg
17+
CONFIGURATION: "Release"
18+
ARTIFACTS_STAGING_DIR_PATH: "nupkg"
19+
OG_SOLUTION_PATH: "Octokit.GraphQL.sln"
20+
OG_UNIT_TESTS_PROJ_PATH: ".\\src\\Octokit.GraphQL.UnitTests\\Octokit.GraphQL.UnitTests.csproj"
21+
OG_CORE_UNIT_TESTS_PROJ_PATH: ".\\src\\Octokit.GraphQL.Core.UnitTests\\Octokit.GraphQL.Core.UnitTests.csproj"
22+
OG_CORE_GENERATOR_UNIT_TESTS_PROJ_PATH: ".\\src\\Octokit.GraphQL.Core.Generation.UnitTests\\Octokit.GraphQL.Core.Generation.UnitTests.csproj"
23+
OG_PACK_PROJ_PATH: ".\\src\\Octokit.GraphQL.Pack\\Octokit.GraphQL.Pack.csproj"
24+
1325
jobs:
1426
build-test-publish:
1527
runs-on: windows-latest
1628
steps:
17-
- uses: actions/checkout@v3
18-
- name: Setup .NET Core and GitHub Packages
19-
uses: actions/setup-dotnet@v1
29+
30+
- name: Checkout the repository
31+
uses: actions/checkout@v4
32+
- name: Setup .NET & GitHub Packages
33+
uses: actions/setup-dotnet@v4
2034
with:
2135
dotnet-version: 3.1.101
2236
source-url: https://nuget.pkg.github.com/octokit/index.json
2337
env:
24-
NUGET_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
38+
NUGET_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2539
- name: Setup NuGet
26-
uses: nuget/setup-nuget@v1
27-
with:
28-
nuget-version: 5.x
29-
- name: Build using .NET Core
30-
run: dotnet build Octokit.GraphQL.sln -c ${{ env.config }}
40+
uses: nuget/setup-nuget@v2
41+
42+
- name: Build the solution
43+
run: dotnet build ${{ env.OG_SOLUTION_PATH }} -c ${{ env.CONFIGURATION }}
44+
3145
- name: Run Octokit.GraphQL.UnitTests
32-
run: >-
33-
dotnet test -c ${{ env.config }} --no-build
34-
.\Octokit.GraphQL.UnitTests\Octokit.GraphQL.UnitTests.csproj
46+
run: dotnet test -c ${{ env.CONFIGURATION }} --no-build ${{ env.OG_UNIT_TESTS_PROJ_PATH }}
47+
3548
- name: Run Octokit.GraphQL.Core.UnitTests
36-
run: >-
37-
dotnet test -c ${{ env.config }} --no-build
38-
.\Octokit.GraphQL.Core.UnitTests\Octokit.GraphQL.Core.UnitTests.csproj
49+
run: dotnet test -c ${{ env.CONFIGURATION }} --no-build ${{ env.OG_CORE_UNIT_TESTS_PROJ_PATH }}
50+
3951
- name: Run Octokit.GraphQL.Core.Generation.UnitTests
40-
run: >-
41-
dotnet test -c ${{ env.config }} --no-build
42-
.\Octokit.GraphQL.Core.Generation.UnitTests\Octokit.GraphQL.Core.Generation.UnitTests.csproj
43-
- name: Create package using .nuspec
44-
run: >-
45-
dotnet pack Octokit.GraphQL.Pack/Octokit.GraphQL.Pack.csproj --output
46-
${{ env.PackageOutputPath }}
47-
- name: Upload nupkg artifact
52+
run: dotnet test -c ${{ env.CONFIGURATION }} --no-build ${{ env.OG_CORE_GENERATOR_UNIT_TESTS_PROJ_PATH }}
53+
54+
- name: Create the new package
55+
run: dotnet pack ${{ env.OG_PACK_PROJ_PATH }} -o ${{ env.ARTIFACTS_STAGING_DIR_PATH }}
56+
57+
- name: Publish to GitHub Actions
4858
uses: actions/upload-artifact@v4
4959
with:
5060
name: nupkg
51-
path: ${{ env.PackageOutputPath }}/*.nupkg
61+
path: ${{ env.ARTIFACTS_STAGING_DIR_PATH }}/*.nupkg
62+
5263
- name: Publish to GitHub Packages
5364
if: github.ref == 'refs/heads/main'
54-
shell: bash
55-
run: dotnet nuget push ${{ env.PackageOutputPath }}/*.nupkg
65+
run: dotnet nuget push ${{ env.ARTIFACTS_STAGING_DIR_PATH }}/*.nupkg
66+
5667
- name: Publish to nuget.org
5768
if: github.ref == 'refs/heads/main'
58-
shell: bash
59-
run: >-
60-
dotnet nuget push ${{ env.PackageOutputPath }}/*.nupkg --source
61-
nuget.org -k ${{ secrets.NUGET_TOKEN }}
69+
run: dotnet nuget push ${{ env.ARTIFACTS_STAGING_DIR_PATH }}/*.nupkg -s nuget.org -k ${{ secrets.NUGET_TOKEN }}

.github/workflows/generate-schema.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
run: dotnet restore
2323
- name: Generate
2424
run: >-
25-
dotnet run --project ./Tools/Generate/Generate.csproj -- ${{
26-
github.token }} ./Octokit.GraphQL/
25+
dotnet run --project ./tools/Generate/Generate.csproj -- ${{
26+
github.token }} ./src/Octokit.GraphQL/
2727
- name: Build
2828
run: dotnet build

.github/workflows/integration-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
dotnet test -c ${{ env.config }} --no-build /p:CollectCoverage=true
2626
/p:CoverletOutputFormat=opencover
2727
/p:Exclude="[Octokit.GraphQL]Octokit.GraphQL.*"
28-
.\Octokit.GraphQL.IntegrationTests\Octokit.GraphQL.IntegrationTests.csproj
28+
.\src\Octokit.GraphQL.IntegrationTests\Octokit.GraphQL.IntegrationTests.csproj
2929
env:
3030
OCTOKIT_GQL_OAUTHTOKEN: ${{ secrets.OCTOKIT_GQL_OAUTHTOKEN }}
3131
OCTOKIT_GQL_GITHUBUSERNAME: ${{ secrets.OCTOKIT_GQL_GITHUBUSERNAME }}

.gitmodules

Whitespace-only changes.

.travis.yml

Lines changed: 0 additions & 17 deletions
This file was deleted.

Octokit.GraphQL.Core.Generation.UnitTests/Octokit.GraphQL.Core.Generation.UnitTests.v3.ncrunchproject

Lines changed: 0 additions & 5 deletions
This file was deleted.

Octokit.GraphQL.Core.Generation/Octokit.GraphQL.Core.Generation.v3.ncrunchproject

Lines changed: 0 additions & 5 deletions
This file was deleted.

Octokit.GraphQL.Core.UnitTests/Octokit.GraphQL.Core.UnitTests.v3.ncrunchproject

Lines changed: 0 additions & 5 deletions
This file was deleted.

0 commit comments

Comments
 (0)