Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
43a5989
Update Program.cs
jepetty Jun 30, 2020
e44b42a
Update GameObject.ts
jepetty Jul 1, 2020
21df570
Add first workflow templates
jepetty Jul 9, 2020
f1f6e2c
Add typescript action
jepetty Jul 9, 2020
2eb92d0
Update richnav-csharp.yml
jepetty Jul 9, 2020
0cbba6c
Use master of rich nav task
jepetty Jul 9, 2020
692abec
Add java workflow
jepetty Jul 9, 2020
b75b1ae
Fix typescript action
jepetty Jul 9, 2020
27017e4
Merge branch 'master' into addTemplates
jepetty Jul 9, 2020
829630f
Add new template for entire workflow
jepetty Jul 9, 2020
34cedcd
Merge branch 'addTemplates' of https://github.com/jepetty/tester-game…
jepetty Jul 9, 2020
e3dfb32
try specifying pull requests first
jepetty Jul 9, 2020
41d17e0
Explicitly list languages, use v0.1 for all
jepetty Jul 13, 2020
b59b9b2
Fix typo
jepetty Jul 13, 2020
3ae0f6a
Merge pull request #3 from jepetty/addTemplates
jepetty Jul 13, 2020
06c1c80
Update typescript restore steps
jepetty Jul 13, 2020
644d98a
Update App.java
jepetty Aug 4, 2020
bc672ee
Update based on feedback from Etienne
jepetty Sep 1, 2020
e6aa74a
TEST: Only specify root directory
jepetty Sep 1, 2020
ee14cac
Add multiple solution files example
jepetty Sep 1, 2020
6012324
Add example of a scheduled run
jepetty Sep 1, 2020
d9bf6cc
Remove other triggers from scheduled pipeline
jepetty Sep 1, 2020
1748ae3
Merge pull request #5 from jepetty/updates
jepetty Sep 1, 2020
5b121c6
Add example of caching dependencies
jepetty Oct 5, 2020
2de4596
Fix a few more documentation problems
jepetty Oct 6, 2020
527282e
Merge pull request #6 from jepetty/addCaching
jepetty Oct 6, 2020
30dea74
Update Block.ts
jepetty Oct 6, 2020
91ca723
Update GameObject.cs
jepetty Oct 9, 2020
1f043df
Update Interactive.ts
jepetty Oct 9, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
65 changes: 65 additions & 0 deletions .github/workflows/richnav-all.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
### 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

on:
pull_request:
push:
# **** Add any the name of your default branch, or any branch you want indexed on every push **** #
branches: [ main ]

jobs:
richnav:

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

# **** Please change the version of Node being used to the one for your project **** #
- name: Use Node.js 12.x
uses: actions/setup-node@v1
with:
node-version: 12.x

# **** Please update to point to the location where your node dependencies are installed **** #
- uses: actions/cache@v2
id: caching-stage
name: Cache dependencies
with:
path: node_modules
key: ${{ runner.os }}-dependencies-${{ hashfiles('typescript/yarn.lock') }}
restore-keys: ${{ runner.os }}-dependencies-

# **** Please update, at least, the working directory below. You may also want to use npm install instead **** #
- run: yarn
working-directory: typescript
if: steps.caching-stage.outputs.cache-hit != 'true'

# **** If you use NPM to install packages, please uncomment this task and delete the yarn task **** #
# - name: npm install
# working-directory: typescript
# run: npm install

- name: Set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8

- uses: microsoft/RichCodeNavIndexer@v0.1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
languages: csharp,java,typescript,cpp
37 changes: 37 additions & 0 deletions .github/workflows/richnav-csharp-multiple-sln.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
### 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 - Multiple Solutions)

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 }}
34 changes: 34 additions & 0 deletions .github/workflows/richnav-csharp.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
### 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

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 }}
28 changes: 28 additions & 0 deletions .github/workflows/richnav-java.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
### 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)

on:
pull_request:
push:
# **** Add any the name of your default branch, or any branch you want indexed on every push **** #
branches: [ main ]

jobs:
richnav:

runs-on: windows-latest

steps:
- uses: actions/checkout@v2

- name: Set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8

- uses: microsoft/RichCodeNavIndexer@v0.1
with:
languages: java
repo-token: ${{ secrets.GITHUB_TOKEN }}
35 changes: 35 additions & 0 deletions .github/workflows/richnav-scheduled.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
### 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'

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 }}
47 changes: 47 additions & 0 deletions .github/workflows/richnav-typescript.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
### 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)

on:
pull_request:
push:
# **** Add any the name of your default branch, or any branch you want indexed on every push **** #
branches: [ main ]

jobs:
richnav:

runs-on: windows-latest

# **** If necessary, use the Node version for your repository. Note: must be greater than 10.x **** #
strategy:
matrix:
node-version: [10.x, 12.x, 14.x]

steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}

# **** Please update to point to the location where your node dependencies are installed **** #
- uses: actions/cache@v2
id: caching-stage
name: Cache dependencies
with:
path: node_modules
key: ${{ runner.os }}-dependencies-${{ hashfiles('typescript/yarn.lock') }}
restore-keys: ${{ runner.os }}-dependencies-

# **** Please update the working-directory to the location where your package.json file resides **** #
- run: yarn
working-directory: typescript
if: steps.caching-stage.outputs.cache-hit != 'true'

- uses: microsoft/RichCodeNavIndexer@v0.1
with:
languages: typescript
repo-token: ${{ secrets.GITHUB_TOKEN }}

3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
##
## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore

# TypeScript
typescript/lib
node_modules
.vscode/

# User-specific files
Expand Down
25 changes: 25 additions & 0 deletions AnotherSolution/AnotherSolution.sln
Original file line number Diff line number Diff line change
@@ -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
8 changes: 8 additions & 0 deletions AnotherSolution/AnotherSolution/AnotherSolution.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp3.1</TargetFramework>
</PropertyGroup>

</Project>
12 changes: 12 additions & 0 deletions AnotherSolution/AnotherSolution/Program.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
using System;

namespace AnotherSolution
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Another testing solution!");
}
}
}
3 changes: 2 additions & 1 deletion csharp/src/GameObject.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,12 @@ public GameObject(int x, int y)
public void interact()
{
Console.WriteLine("Interacting with GameObject");
Console.WriteLine("Nice work! You rock!");
}

public void draw()
{
Console.WriteLine($"Drawing GameObject at position: {this.posX} {this.posY}");
}
}
}
}
1 change: 1 addition & 0 deletions csharp/src/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ class Program
{
static void Main(string[] args)
{
Console.WriteLine("hello!");
Interactive block = new GameObject(10, 10);
block.interact();
}
Expand Down
1 change: 1 addition & 0 deletions java/src/main/java/com/test/sort/App.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ public class App
public static void main( String[] args )
{
System.out.println( "Hello World!" );
System.out.println("Hiya!");
}
}

Expand Down
14 changes: 14 additions & 0 deletions typescript/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"name": "tester-game",
"version": "0.0.1",
"description": "A simple Typescript game to test things",
"main": "App.js",
"license": "MIT",
"scripts": {
"build": "tsc -p ./"
},
"dependencies": {
"@types/node": "^14.11.3",
"add-two-number": "^0.2.0"
}
}
4 changes: 2 additions & 2 deletions typescript/src/Block.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ export default class Block extends GameObject {
}

interact(): void {
console.log('You get a coin!');
console.log('You get a coin, you rock star!');
}
}
}
5 changes: 4 additions & 1 deletion typescript/src/GameObject.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import Drawable from './Drawable'
import Interactive from './Interactive'
const add: any = require('add-two-number');

export default class GameObject implements Drawable, Interactive {
posX: number;
Expand All @@ -12,9 +13,11 @@ export default class GameObject implements Drawable, Interactive {

interact(): void {
console.log("Interacting with GameObject");
console.log(`Adding two numbers: ${add(this.posX, this.posY)}`);
}

draw(): void {
console.log(`Drawing GameObject at position: ${this.posX} ${this.posY}`);
console.log('hi, mom!!');
}
}
}
3 changes: 2 additions & 1 deletion typescript/src/Interactive.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
export default interface Interactive {
// interacts
interact: () => void;
}
}
Loading