-
-
Notifications
You must be signed in to change notification settings - Fork 10
[DependencyUpdater] Allow to run from different organizations #42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
josesimoes
merged 20 commits into
nanoframework:main
from
torbacz:allowToRunFromDifferentOrganizations
Jul 13, 2022
Merged
Changes from all commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
6044862
Update DependencyUpdater parsing .git repository file to work with ot…
nfbot b6cc6fb
Added gitHubUser&gitHubEmail parameters.
nfbot e54a742
Migrate to MSTest from xunit
nfbot 65a0cf0
Add repoOwner to arguments.
nfbot 220783d
Update DependencyUpdater pipeline - include unit tests
torbacz c24235b
Update DependencyUpdater pipeline - include unit tests
torbacz 76e82cd
Update DependencyUpdater pipeline - include unit tests
torbacz 02cfdd7
Update DependencyUpdater pipeline - include unit tests
torbacz 625b9f8
Update DependencyUpdater pipeline - include unit tests
torbacz 5d59d95
Update DependencyUpdater pipeline - include unit tests
torbacz 8ab95d9
Update DependencyUpdater pipeline - include unit tests
torbacz e384d31
Update DependencyUpdater pipeline - include unit tests
torbacz 4143631
Update DependencyUpdater pipeline - include unit tests
torbacz 888ffef
Update path to code coverage summaryFileLocation
torbacz ca5bb59
Add missing comment.
torbacz 7bc9574
Update azure-pipelines.yml
torbacz 704e4a9
Fail on test fail but continue to upload results
torbacz 67d3b36
Fix indent
torbacz 8cece73
Failing tests for test purpose.
torbacz a9a4c0b
Revert "Failing tests for test purpose."
torbacz File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
tools/DependencyUpdater/DependencyUpdater.Tests/DependencyUpdater.Tests.csproj
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<TargetFramework>net6.0</TargetFramework> | ||
<ImplicitUsings>enable</ImplicitUsings> | ||
<Nullable>enable</Nullable> | ||
|
||
<IsPackable>false</IsPackable> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.1.0"/> | ||
<PackageReference Include="MSTest.TestAdapter" Version="2.2.8"/> | ||
<PackageReference Include="MSTest.TestFramework" Version="2.2.8"/> | ||
<PackageReference Include="coverlet.collector" Version="3.1.2"/> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<ProjectReference Include="..\DependencyUpdater.csproj" /> | ||
</ItemGroup> | ||
|
||
</Project> |
32 changes: 32 additions & 0 deletions
32
tools/DependencyUpdater/DependencyUpdater.Tests/ProgramTests.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
// | ||
// Copyright (c) .NET Foundation and Contributors | ||
// See LICENSE file in the project root for full license information. | ||
// | ||
|
||
namespace DependencyUpdater.Tests; | ||
|
||
[TestClass] | ||
public class ProgramTests | ||
{ | ||
[DataTestMethod] | ||
[DataRow("origin https://github.com/torbacz/nf-tools.git (fetch) origin https://github.com/torbacz/nf-tools.git (push)", "nf-tools")] | ||
[DataRow("origin https://github.com/nanoframework/nf-tools.git (fetch) origin https://github.com/nanoframework/nf-tools.git (push)", "nf-tools")] | ||
public void GetLibNameFromGitString_Should_ReturnValidData(string inputData, string expectedResult) | ||
{ | ||
var result = nanoFramework.Tools.DependencyUpdater.Program.GetRepoNameFromInputString(inputData); | ||
Assert.IsTrue(result.Success); | ||
|
||
var libName = nanoFramework.Tools.DependencyUpdater.Program.GetLibNameFromRegexMatch(result); | ||
Assert.AreEqual(expectedResult, libName); | ||
} | ||
|
||
[DataTestMethod] | ||
[DataRow("origin https://github.com/torbacz/nf-tools.git (fetch) origin https://github.com/torbacz/nf-tools.git (push)", "torbacz")] | ||
[DataRow("origin https://github.com/nanoframework/nf-tools.git (fetch) origin https://github.com/nanoframework/nf-tools.git (push)", "nanoframework")] | ||
[DataRow("origin https://github.com/nanoframework-test/nf-tools.git (fetch) origin https://github.com/nanoframework/nf-tools.git (push)", "nanoframework-test")] | ||
public void GetRepoOwnerFromInputString_Should_ReturnValidData(string inputData, string expectedResult) | ||
{ | ||
var result = nanoFramework.Tools.DependencyUpdater.Program.GetRepoOwnerFromInputString(inputData); | ||
Assert.AreEqual(expectedResult, result); | ||
} | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
global using Microsoft.VisualStudio.TestTools.UnitTesting; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.