From bc672ee8ed56f4375d80f5547abb704c345631b1 Mon Sep 17 00:00:00 2001 From: Jessica Petty Date: Tue, 1 Sep 2020 11:31:54 -0700 Subject: [PATCH 1/5] Update based on feedback from Etienne --- .github/workflows/richnav-all.yml | 8 +++++--- .github/workflows/richnav-csharp.yml | 7 ++++--- .github/workflows/richnav-java.yml | 5 +++-- .github/workflows/richnav-typescript.yml | 5 +++-- 4 files changed, 15 insertions(+), 10 deletions(-) diff --git a/.github/workflows/richnav-all.yml b/.github/workflows/richnav-all.yml index df447e0..fe09145 100644 --- a/.github/workflows/richnav-all.yml +++ b/.github/workflows/richnav-all.yml @@ -1,4 +1,5 @@ -### This template is meant to be used by a .NET Core repository running RichNav +### This template is meant to be used by a multi-language repo running RichNav. +### It provides rich navigation for C#, JavaScript, TypeScript, C++, and Java ### Please fill anything marked above with a "# **** #" comment with the value appropriate for your repository name: Rich Code Navigation @@ -6,7 +7,8 @@ name: Rich Code Navigation on: pull_request: push: - branches: [ master ] + # **** Add any the name of your default branch, or any branch you want indexed on every push **** # + branches: [ main ] jobs: richnav: @@ -16,7 +18,7 @@ jobs: steps: - uses: actions/checkout@v2 - # **** Please change 'dotnet-version' to be the version of the .NET SDK used in your project **** # + # **** If you've defined a specific dotnet version in global.json, change 'dotnet-version' to the version of the .NET SDK used in your project **** # - name: Setup .NET Core uses: actions/setup-dotnet@v1 with: diff --git a/.github/workflows/richnav-csharp.yml b/.github/workflows/richnav-csharp.yml index 6d693b5..c384103 100644 --- a/.github/workflows/richnav-csharp.yml +++ b/.github/workflows/richnav-csharp.yml @@ -1,11 +1,12 @@ -### This template is meant to be used by a .NET Core repository running RichNav +### This template is meant to be used by a C# repository running RichNav ### Please fill anything marked above with a "# **** #" comment with the value appropriate for your repository name: Rich Code Navigation (.NET Core) on: pull_request: push: - branches: [ master ] + # **** Add any the name of your default branch, or any branch you want indexed on every push **** # + branches: [ main ] jobs: build: @@ -16,7 +17,7 @@ jobs: - uses: actions/checkout@v2 - # **** Please change 'dotnet-version' to be the version of the .NET SDK used in your project **** # + # **** If you've defined a specific dotnet version in global.json, change 'dotnet-version' to the version of the .NET SDK used in your project **** # - name: Setup .NET Core uses: actions/setup-dotnet@v1 with: diff --git a/.github/workflows/richnav-java.yml b/.github/workflows/richnav-java.yml index ae1406e..ff2e182 100644 --- a/.github/workflows/richnav-java.yml +++ b/.github/workflows/richnav-java.yml @@ -1,4 +1,4 @@ -### This template is meant to be used by a .NET Core repository running RichNav +### This template is meant to be used by a Java repository running RichNav ### Please fill anything marked above with a "# **** #" comment with the value appropriate for your repository name: Rich Code Navigation (Java with Maven) @@ -6,7 +6,8 @@ name: Rich Code Navigation (Java with Maven) on: pull_request: push: - branches: [ master ] + # **** Add any the name of your default branch, or any branch you want indexed on every push **** # + branches: [ main ] jobs: richnav: diff --git a/.github/workflows/richnav-typescript.yml b/.github/workflows/richnav-typescript.yml index 99fde22..ba4aaa6 100644 --- a/.github/workflows/richnav-typescript.yml +++ b/.github/workflows/richnav-typescript.yml @@ -1,4 +1,4 @@ -### This template is meant to be used by a .NET Core repository running RichNav +### This template is meant to be used by a TypeScript or JavaScript repository running RichNav ### Please fill anything marked above with a "# **** #" comment with the value appropriate for your repository name: Rich Code Navigation (Node JS) @@ -6,7 +6,8 @@ name: Rich Code Navigation (Node JS) on: pull_request: push: - branches: [ master ] + # **** Add any the name of your default branch, or any branch you want indexed on every push **** # + branches: [ main ] jobs: richnav: From e6aa74a2ae5bc614507ceb353559a667c3810025 Mon Sep 17 00:00:00 2001 From: Jessica Petty Date: Tue, 1 Sep 2020 11:32:25 -0700 Subject: [PATCH 2/5] TEST: Only specify root directory --- .github/workflows/richnav-csharp.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/richnav-csharp.yml b/.github/workflows/richnav-csharp.yml index c384103..b6edd9b 100644 --- a/.github/workflows/richnav-csharp.yml +++ b/.github/workflows/richnav-csharp.yml @@ -26,7 +26,7 @@ jobs: # **** Please change 'working-directory' to be the location where your .SLN file is located **** # - name: Install dependencies run: dotnet restore - working-directory: ./csharp + working-directory: ./ - uses: microsoft/RichCodeNavIndexer@v0.1 with: From ee14cacf84f7dea01ce8cecb2eb4f348fa96065c Mon Sep 17 00:00:00 2001 From: Jessica Petty Date: Tue, 1 Sep 2020 12:14:03 -0700 Subject: [PATCH 3/5] Add multiple solution files example --- .../richnav-csharp-multiple-sln.yaml | 37 +++++++++++++++++++ .github/workflows/richnav-csharp.yml | 2 +- AnotherSolution/AnotherSolution.sln | 25 +++++++++++++ .../AnotherSolution/AnotherSolution.csproj | 8 ++++ AnotherSolution/AnotherSolution/Program.cs | 12 ++++++ 5 files changed, 83 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/richnav-csharp-multiple-sln.yaml create mode 100644 AnotherSolution/AnotherSolution.sln create mode 100644 AnotherSolution/AnotherSolution/AnotherSolution.csproj create mode 100644 AnotherSolution/AnotherSolution/Program.cs diff --git a/.github/workflows/richnav-csharp-multiple-sln.yaml b/.github/workflows/richnav-csharp-multiple-sln.yaml new file mode 100644 index 0000000..5c59353 --- /dev/null +++ b/.github/workflows/richnav-csharp-multiple-sln.yaml @@ -0,0 +1,37 @@ +### This template is meant to be used by a C# repository running RichNav +### Please fill anything marked above with a "# **** #" comment with the value appropriate for your repository +name: Rich Code Navigation (.NET Core) + +on: + pull_request: + push: + # **** Add any the name of your default branch, or any branch you want indexed on every push **** # + branches: [ main ] + +jobs: + build: + + runs-on: windows-latest + strategy: + matrix: + # **** Please change the list to be the folders which contain solutions **** # + slnDirs: [ './csharp', './AnotherSolution' ] + + steps: + + - uses: actions/checkout@v2 + + # **** If you've defined a specific dotnet version in global.json, change 'dotnet-version' to the version of the .NET SDK used in your project **** # + - name: Setup .NET Core + uses: actions/setup-dotnet@v1 + with: + dotnet-version: 3.1.101 + + - name: Install dependencies + run: dotnet restore + working-directory: ${{ matrix.slnDirs }} + + - uses: microsoft/RichCodeNavIndexer@v0.1 + with: + languages: csharp + repo-token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/richnav-csharp.yml b/.github/workflows/richnav-csharp.yml index b6edd9b..c384103 100644 --- a/.github/workflows/richnav-csharp.yml +++ b/.github/workflows/richnav-csharp.yml @@ -26,7 +26,7 @@ jobs: # **** Please change 'working-directory' to be the location where your .SLN file is located **** # - name: Install dependencies run: dotnet restore - working-directory: ./ + working-directory: ./csharp - uses: microsoft/RichCodeNavIndexer@v0.1 with: diff --git a/AnotherSolution/AnotherSolution.sln b/AnotherSolution/AnotherSolution.sln new file mode 100644 index 0000000..411d3f5 --- /dev/null +++ b/AnotherSolution/AnotherSolution.sln @@ -0,0 +1,25 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30426.262 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AnotherSolution", "AnotherSolution\AnotherSolution.csproj", "{4343B1BF-A100-4951-90AD-42CB919F2895}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {4343B1BF-A100-4951-90AD-42CB919F2895}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {4343B1BF-A100-4951-90AD-42CB919F2895}.Debug|Any CPU.Build.0 = Debug|Any CPU + {4343B1BF-A100-4951-90AD-42CB919F2895}.Release|Any CPU.ActiveCfg = Release|Any CPU + {4343B1BF-A100-4951-90AD-42CB919F2895}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {CE15F879-CB32-4B6C-89A8-1C23E5920DEF} + EndGlobalSection +EndGlobal diff --git a/AnotherSolution/AnotherSolution/AnotherSolution.csproj b/AnotherSolution/AnotherSolution/AnotherSolution.csproj new file mode 100644 index 0000000..c73e0d1 --- /dev/null +++ b/AnotherSolution/AnotherSolution/AnotherSolution.csproj @@ -0,0 +1,8 @@ + + + + Exe + netcoreapp3.1 + + + diff --git a/AnotherSolution/AnotherSolution/Program.cs b/AnotherSolution/AnotherSolution/Program.cs new file mode 100644 index 0000000..6e4c684 --- /dev/null +++ b/AnotherSolution/AnotherSolution/Program.cs @@ -0,0 +1,12 @@ +using System; + +namespace AnotherSolution +{ + class Program + { + static void Main(string[] args) + { + Console.WriteLine("Another testing solution!"); + } + } +} From 60123246d0bbeccf463cfe4ba209f18ddaf3f7d2 Mon Sep 17 00:00:00 2001 From: Jessica Petty Date: Tue, 1 Sep 2020 12:26:07 -0700 Subject: [PATCH 4/5] Add example of a scheduled run --- .../richnav-csharp-multiple-sln.yaml | 4 +- .github/workflows/richnav-scheduled.yaml | 39 +++++++++++++++++++ 2 files changed, 41 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/richnav-scheduled.yaml diff --git a/.github/workflows/richnav-csharp-multiple-sln.yaml b/.github/workflows/richnav-csharp-multiple-sln.yaml index 5c59353..6bc51a6 100644 --- a/.github/workflows/richnav-csharp-multiple-sln.yaml +++ b/.github/workflows/richnav-csharp-multiple-sln.yaml @@ -1,6 +1,6 @@ -### This template is meant to be used by a C# repository running RichNav +### This template is meant to be used by a C# repository with multiple solutions running RichNav ### Please fill anything marked above with a "# **** #" comment with the value appropriate for your repository -name: Rich Code Navigation (.NET Core) +name: Rich Code Navigation (.NET Core - Multiple Solutions) on: pull_request: diff --git a/.github/workflows/richnav-scheduled.yaml b/.github/workflows/richnav-scheduled.yaml new file mode 100644 index 0000000..212cc2f --- /dev/null +++ b/.github/workflows/richnav-scheduled.yaml @@ -0,0 +1,39 @@ +### This template is meant to be used by a C# repository running RichNav on a scheduled cadence. +### This is particularly appropriate for reference repositories that aren't updated monthly. +### Please replace the C# specific steps with steps for your particular language +### Please fill anything marked above with a "# **** #" comment with the value appropriate for your repository +name: Rich Code Navigation (.NET Core) + +on: + schedule: + # **** This runs the action on the 14th of every month at midnight. Adjust the schedule as appropriate for your needs **** # + - cron: '0 14 * * 1' + pull_request: + push: + # **** Add any the name of your default branch, or any branch you want indexed on every push **** # + branches: [ main ] + +jobs: + build: + + runs-on: windows-latest + + steps: + + - uses: actions/checkout@v2 + + # **** If you've defined a specific dotnet version in global.json, change 'dotnet-version' to the version of the .NET SDK used in your project **** # + - name: Setup .NET Core + uses: actions/setup-dotnet@v1 + with: + dotnet-version: 3.1.101 + + # **** Please change 'working-directory' to be the location where your .SLN file is located **** # + - name: Install dependencies + run: dotnet restore + working-directory: ./csharp + + - uses: microsoft/RichCodeNavIndexer@v0.1 + with: + languages: csharp + repo-token: ${{ secrets.GITHUB_TOKEN }} From d9bf6cca086b3992c811324930397f0523634b05 Mon Sep 17 00:00:00 2001 From: Jessica Petty Date: Tue, 1 Sep 2020 12:28:36 -0700 Subject: [PATCH 5/5] Remove other triggers from scheduled pipeline --- .github/workflows/richnav-scheduled.yaml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/workflows/richnav-scheduled.yaml b/.github/workflows/richnav-scheduled.yaml index 212cc2f..f6cc8fe 100644 --- a/.github/workflows/richnav-scheduled.yaml +++ b/.github/workflows/richnav-scheduled.yaml @@ -8,10 +8,6 @@ on: schedule: # **** This runs the action on the 14th of every month at midnight. Adjust the schedule as appropriate for your needs **** # - cron: '0 14 * * 1' - pull_request: - push: - # **** Add any the name of your default branch, or any branch you want indexed on every push **** # - branches: [ main ] jobs: build: