From 6ea1410a552ed66c2b327f0534322c56d41c46e7 Mon Sep 17 00:00:00 2001 From: Mateusz Noga-Wojtania Date: Thu, 24 Sep 2026 11:13:28 +0200 Subject: [PATCH 01/14] test new workflow --- .../DoNothing_build_and_test_on_push.yml | 20 +++++++------------ .../Frends.TestTask.DoNothing.sln | 7 ++++++- 2 files changed, 13 insertions(+), 14 deletions(-) diff --git a/.github/workflows/DoNothing_build_and_test_on_push.yml b/.github/workflows/DoNothing_build_and_test_on_push.yml index f90a170..440df40 100644 --- a/.github/workflows/DoNothing_build_and_test_on_push.yml +++ b/.github/workflows/DoNothing_build_and_test_on_push.yml @@ -6,23 +6,17 @@ on: - main paths: - 'Frends.TestTask.DoNothing/**' + - '.github/workflows/**' workflow_dispatch: - + jobs: - linux_build: - name: build on Linux - uses: FrendsPlatform/FrendsTasks/.github/workflows/linux_build_test.yml@main + build: + uses: FrendsPlatform/FrendsTasks/.github/workflows/collective_build.yml@workflows-update with: - workdir: Frends.TestTask.DoNothing + os: lin + workdir: Party.Echo.Execute + env_vars: '{"username":"${{ secrets.USERNAME }}"}' secrets: badge_service_api_key: ${{ secrets.BADGE_SERVICE_API_KEY }} test_feed_api_key: ${{ secrets.TASKS_TEST_FEED_API_KEY }} - windows_build: - name: build on windows - uses: FrendsPlatform/FrendsTasks/.github/workflows/build_test.yml@main - with: - workdir: Frends.TestTask.DoNothing - secrets: - badge_service_api_key: ${{ secrets.BADGE_SERVICE_API_KEY }} - test_feed_api_key: ${{ secrets.TASKS_TEST_FEED_API_KEY }} \ No newline at end of file diff --git a/Frends.TestTask.DoNothing/Frends.TestTask.DoNothing.sln b/Frends.TestTask.DoNothing/Frends.TestTask.DoNothing.sln index 7c04d31..23ba934 100644 --- a/Frends.TestTask.DoNothing/Frends.TestTask.DoNothing.sln +++ b/Frends.TestTask.DoNothing/Frends.TestTask.DoNothing.sln @@ -9,8 +9,13 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Frends.TestTask.DoNothing.T EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{78F7F22E-6E20-4BCE-8362-0C558568B729}" ProjectSection(SolutionItems) = preProject - .gitignore = .gitignore README.md = README.md + CHANGELOG.md = CHANGELOG.md + ..\.gitignore = ..\.gitignore + ..\README.md = ..\README.md + ..\.github\workflows\DoNothing_build_and_test_on_main.yml = ..\.github\workflows\DoNothing_build_and_test_on_main.yml + ..\.github\workflows\DoNothing_build_and_test_on_push.yml = ..\.github\workflows\DoNothing_build_and_test_on_push.yml + ..\.github\workflows\DoNothing_release.yml = ..\.github\workflows\DoNothing_release.yml EndProjectSection EndProject Global From 49c7a537d6e15e83e22c0fad2d8d7fd8a2e658f8 Mon Sep 17 00:00:00 2001 From: Mateusz Noga-Wojtania Date: Thu, 24 Sep 2026 11:27:21 +0200 Subject: [PATCH 02/14] fix secrets --- .github/workflows/DoNothing_build_and_test_on_push.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/DoNothing_build_and_test_on_push.yml b/.github/workflows/DoNothing_build_and_test_on_push.yml index 440df40..10b9223 100644 --- a/.github/workflows/DoNothing_build_and_test_on_push.yml +++ b/.github/workflows/DoNothing_build_and_test_on_push.yml @@ -16,7 +16,7 @@ jobs: with: os: lin workdir: Party.Echo.Execute - env_vars: '{"username":"${{ secrets.USERNAME }}"}' secrets: badge_service_api_key: ${{ secrets.BADGE_SERVICE_API_KEY }} test_feed_api_key: ${{ secrets.TASKS_TEST_FEED_API_KEY }} + env_vars: '{"username": ${{ toJSON(secrets.USERNAME) }}}' From 806ece195ec80a7013ffd59a99d9d75d1aa622e7 Mon Sep 17 00:00:00 2001 From: Mateusz Noga-Wojtania Date: Thu, 24 Sep 2026 11:58:45 +0200 Subject: [PATCH 03/14] FIX COPYPASTE ERROR --- .github/workflows/DoNothing_build_and_test_on_push.yml | 2 +- .../Frends.TestTask.DoNothing.Tests.csproj | 4 ++-- .../Frends.TestTask.DoNothing.csproj | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/DoNothing_build_and_test_on_push.yml b/.github/workflows/DoNothing_build_and_test_on_push.yml index 10b9223..e59d28e 100644 --- a/.github/workflows/DoNothing_build_and_test_on_push.yml +++ b/.github/workflows/DoNothing_build_and_test_on_push.yml @@ -15,7 +15,7 @@ jobs: uses: FrendsPlatform/FrendsTasks/.github/workflows/collective_build.yml@workflows-update with: os: lin - workdir: Party.Echo.Execute + workdir: Frends.TestTask.DoNothing secrets: badge_service_api_key: ${{ secrets.BADGE_SERVICE_API_KEY }} test_feed_api_key: ${{ secrets.TASKS_TEST_FEED_API_KEY }} diff --git a/Frends.TestTask.DoNothing/Frends.TestTask.DoNothing.Tests/Frends.TestTask.DoNothing.Tests.csproj b/Frends.TestTask.DoNothing/Frends.TestTask.DoNothing.Tests/Frends.TestTask.DoNothing.Tests.csproj index 8d0df0a..2cd4030 100644 --- a/Frends.TestTask.DoNothing/Frends.TestTask.DoNothing.Tests/Frends.TestTask.DoNothing.Tests.csproj +++ b/Frends.TestTask.DoNothing/Frends.TestTask.DoNothing.Tests/Frends.TestTask.DoNothing.Tests.csproj @@ -1,7 +1,7 @@  - net6.0 + net8.0 false @@ -20,4 +20,4 @@ - \ No newline at end of file + diff --git a/Frends.TestTask.DoNothing/Frends.TestTask.DoNothing/Frends.TestTask.DoNothing.csproj b/Frends.TestTask.DoNothing/Frends.TestTask.DoNothing/Frends.TestTask.DoNothing.csproj index 5fb9881..08336f0 100644 --- a/Frends.TestTask.DoNothing/Frends.TestTask.DoNothing/Frends.TestTask.DoNothing.csproj +++ b/Frends.TestTask.DoNothing/Frends.TestTask.DoNothing/Frends.TestTask.DoNothing.csproj @@ -1,7 +1,7 @@  - net6.0 + net8.0 Frends Frends Frends From 7318f7782fa20565ad59982394ac5f61e69deec9 Mon Sep 17 00:00:00 2001 From: Mateusz Noga-Wojtania Date: Thu, 24 Sep 2026 12:33:44 +0200 Subject: [PATCH 04/14] linter fix --- .../DoNothing_build_and_test_on_push.yml | 1 + .../Frends.TestTask.DoNothing/DoNothing.cs | 14 ---- .../Frends.TestTask.DoNothing.cs | 16 +++++ .../Frends.TestTask.DoNothing.csproj | 66 ++++++++++++------- .../FrendsTaskMetadata.json | 4 +- .../GlobalSuppressions.cs | 10 +++ 6 files changed, 71 insertions(+), 40 deletions(-) delete mode 100644 Frends.TestTask.DoNothing/Frends.TestTask.DoNothing/DoNothing.cs create mode 100644 Frends.TestTask.DoNothing/Frends.TestTask.DoNothing/Frends.TestTask.DoNothing.cs create mode 100644 Frends.TestTask.DoNothing/Frends.TestTask.DoNothing/GlobalSuppressions.cs diff --git a/.github/workflows/DoNothing_build_and_test_on_push.yml b/.github/workflows/DoNothing_build_and_test_on_push.yml index e59d28e..939054b 100644 --- a/.github/workflows/DoNothing_build_and_test_on_push.yml +++ b/.github/workflows/DoNothing_build_and_test_on_push.yml @@ -16,6 +16,7 @@ jobs: with: os: lin workdir: Frends.TestTask.DoNothing + strict_analyzers: false secrets: badge_service_api_key: ${{ secrets.BADGE_SERVICE_API_KEY }} test_feed_api_key: ${{ secrets.TASKS_TEST_FEED_API_KEY }} diff --git a/Frends.TestTask.DoNothing/Frends.TestTask.DoNothing/DoNothing.cs b/Frends.TestTask.DoNothing/Frends.TestTask.DoNothing/DoNothing.cs deleted file mode 100644 index 06783ba..0000000 --- a/Frends.TestTask.DoNothing/Frends.TestTask.DoNothing/DoNothing.cs +++ /dev/null @@ -1,14 +0,0 @@ -namespace Frends.TestTask.DoNothing -{ - public class TestTask - { - /// - /// Not a real task. - /// - public static bool DoNothing() - { - return true; - } - } -} - diff --git a/Frends.TestTask.DoNothing/Frends.TestTask.DoNothing/Frends.TestTask.DoNothing.cs b/Frends.TestTask.DoNothing/Frends.TestTask.DoNothing/Frends.TestTask.DoNothing.cs new file mode 100644 index 0000000..ed79db6 --- /dev/null +++ b/Frends.TestTask.DoNothing/Frends.TestTask.DoNothing/Frends.TestTask.DoNothing.cs @@ -0,0 +1,16 @@ +namespace Frends.TestTask.DoNothing; + +/// +/// docs +/// +public static class TestTask +{ + /// + /// Not a real task. + /// + /// foo + public static bool DoNothing() + { + return true; + } +} diff --git a/Frends.TestTask.DoNothing/Frends.TestTask.DoNothing/Frends.TestTask.DoNothing.csproj b/Frends.TestTask.DoNothing/Frends.TestTask.DoNothing/Frends.TestTask.DoNothing.csproj index 08336f0..eb1176f 100644 --- a/Frends.TestTask.DoNothing/Frends.TestTask.DoNothing/Frends.TestTask.DoNothing.csproj +++ b/Frends.TestTask.DoNothing/Frends.TestTask.DoNothing/Frends.TestTask.DoNothing.csproj @@ -1,31 +1,49 @@  - - net8.0 - Frends - Frends - Frends - Frends - frends - MIT - - true - true - 1.0.3 - This is not a proper Frends task, it is only for testing build and publish pipelines. - https://frends.com/ - https://github.com/FrendsPlatform/Frends.TestTask - + + net8.0 + latest + 1.0.0 + Frends + Frends + Frends + Frends + Frends + MIT + true + TaskDescription + https://frends.com/ + https://github.com/FrendsPlatform/Frends.TestTask/tree/main/Frends.TestTask.DoNothing + disable + + CS1591, + + - - - PreserveNewest - - + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + - - - + + + + + + + + + + diff --git a/Frends.TestTask.DoNothing/Frends.TestTask.DoNothing/FrendsTaskMetadata.json b/Frends.TestTask.DoNothing/Frends.TestTask.DoNothing/FrendsTaskMetadata.json index 7c6e834..fc94510 100644 --- a/Frends.TestTask.DoNothing/Frends.TestTask.DoNothing/FrendsTaskMetadata.json +++ b/Frends.TestTask.DoNothing/Frends.TestTask.DoNothing/FrendsTaskMetadata.json @@ -1,7 +1,7 @@ { "Tasks": [ { - "TaskMethod": "Deliberately.Not.Putting.Correct.Name" + "TaskMethod": "Frends.TestTask.DoNothing.TestTask.DoNothing" } ] -} \ No newline at end of file +} diff --git a/Frends.TestTask.DoNothing/Frends.TestTask.DoNothing/GlobalSuppressions.cs b/Frends.TestTask.DoNothing/Frends.TestTask.DoNothing/GlobalSuppressions.cs new file mode 100644 index 0000000..4b4cc78 --- /dev/null +++ b/Frends.TestTask.DoNothing/Frends.TestTask.DoNothing/GlobalSuppressions.cs @@ -0,0 +1,10 @@ +using System.Diagnostics.CodeAnalysis; + +[assembly: SuppressMessage("StyleCop.CSharp.ReadabilityRules", "SA1101:PrefixLocalCallsWithThis", Justification = "Following Frends documentation guidelines")] +[assembly: SuppressMessage("StyleCop.CSharp.OrderingRules", "SA1200:UsingDirectivesMustBePlacedWithinNamespace", Justification = "Following Frends documentation guidelines")] +[assembly: SuppressMessage("StyleCop.CSharp.LayoutRules", "SA1503:BracesMustNotBeOmitted", Justification = "Following Frends documentation guidelines")] +[assembly: SuppressMessage("StyleCop.CSharp.DocumentationRules", "SA1600:ElementsMustBeDocumented", Justification = "Documentation checked by custom analyzers")] +[assembly: SuppressMessage("StyleCop.CSharp.DocumentationRules", "SA1623:PropertySummaryDocumentationMustMatchAccessors", Justification = "Following Frends Tasks guidelines")] +[assembly: SuppressMessage("StyleCop.CSharp.DocumentationRules", "SA1629:DocumentationTextMustEndWithAPeriod", Justification = "Following Frends Tasks guidelines")] +[assembly: SuppressMessage("StyleCop.CSharp.DocumentationRules", "SA1633:FileMustHaveHeader", Justification = "Following Frends documentation guidelines")] +[assembly: SuppressMessage("StyleCop.CSharp.DocumentationRules", "SA1649:FileNameMustMatchTypeName", Justification = "Following Frends Tasks guidelines")] From 989d85d20c3e306172391dafa6f3b810e642defb Mon Sep 17 00:00:00 2001 From: Mateusz Noga-Wojtania Date: Thu, 24 Sep 2026 12:40:19 +0200 Subject: [PATCH 05/14] clean example --- .../DoNothing_build_and_test_on_push.yml | 1 - .../UnitTests.cs | 8 +++-- .../Definitions/Error.cs | 21 ++++++++++++ .../Definitions/Input.cs | 26 +++++++++++++++ .../Definitions/Options.cs | 33 +++++++++++++++++++ .../Definitions/Result.cs | 19 +++++++++++ .../Frends.TestTask.DoNothing.cs | 21 +++++++++--- 7 files changed, 120 insertions(+), 9 deletions(-) create mode 100644 Frends.TestTask.DoNothing/Frends.TestTask.DoNothing/Definitions/Error.cs create mode 100644 Frends.TestTask.DoNothing/Frends.TestTask.DoNothing/Definitions/Input.cs create mode 100644 Frends.TestTask.DoNothing/Frends.TestTask.DoNothing/Definitions/Options.cs create mode 100644 Frends.TestTask.DoNothing/Frends.TestTask.DoNothing/Definitions/Result.cs diff --git a/.github/workflows/DoNothing_build_and_test_on_push.yml b/.github/workflows/DoNothing_build_and_test_on_push.yml index 939054b..e59d28e 100644 --- a/.github/workflows/DoNothing_build_and_test_on_push.yml +++ b/.github/workflows/DoNothing_build_and_test_on_push.yml @@ -16,7 +16,6 @@ jobs: with: os: lin workdir: Frends.TestTask.DoNothing - strict_analyzers: false secrets: badge_service_api_key: ${{ secrets.BADGE_SERVICE_API_KEY }} test_feed_api_key: ${{ secrets.TASKS_TEST_FEED_API_KEY }} diff --git a/Frends.TestTask.DoNothing/Frends.TestTask.DoNothing.Tests/UnitTests.cs b/Frends.TestTask.DoNothing/Frends.TestTask.DoNothing.Tests/UnitTests.cs index 33a3137..c09219f 100644 --- a/Frends.TestTask.DoNothing/Frends.TestTask.DoNothing.Tests/UnitTests.cs +++ b/Frends.TestTask.DoNothing/Frends.TestTask.DoNothing.Tests/UnitTests.cs @@ -1,3 +1,5 @@ +using System.Threading; +using Frends.TestTask.DoNothing.Definitions; using NUnit.Framework; namespace Frends.TestTask.DoNothing.Tests @@ -8,8 +10,8 @@ public class TestTaskTests [Test] public void DoNothingTest() { - var result = TestTask.DoNothing(); - Assert.IsTrue(result); + var result = TestTask.DoNothing(new Input(), new Options(), CancellationToken.None); + Assert.IsTrue(result.Success); } } -} \ No newline at end of file +} diff --git a/Frends.TestTask.DoNothing/Frends.TestTask.DoNothing/Definitions/Error.cs b/Frends.TestTask.DoNothing/Frends.TestTask.DoNothing/Definitions/Error.cs new file mode 100644 index 0000000..b0e258f --- /dev/null +++ b/Frends.TestTask.DoNothing/Frends.TestTask.DoNothing/Definitions/Error.cs @@ -0,0 +1,21 @@ +using System; + +namespace Frends.TestTask.DoNothing.Definitions; + +/// +/// Error that occurred during the task. +/// +public class Error +{ + /// + /// Summary of the error. + /// + /// Unable to join strings. + public string Message { get; set; } + + /// + /// Additional information about the error. + /// + /// object { Exception AdditionalInfo } + public Exception AdditionalInfo { get; set; } +} diff --git a/Frends.TestTask.DoNothing/Frends.TestTask.DoNothing/Definitions/Input.cs b/Frends.TestTask.DoNothing/Frends.TestTask.DoNothing/Definitions/Input.cs new file mode 100644 index 0000000..67f1719 --- /dev/null +++ b/Frends.TestTask.DoNothing/Frends.TestTask.DoNothing/Definitions/Input.cs @@ -0,0 +1,26 @@ +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; + +namespace Frends.TestTask.DoNothing.Definitions; + +/// +/// Essential parameters. +/// +public class Input +{ + /// + /// The input string to be repeated and output. + /// + /// foobar + [DisplayFormat(DataFormatString = "Text")] + [DefaultValue("Lorem ipsum dolor sit amet.")] + [Required] + public string Content { get; set; } = string.Empty; + + /// + /// Number of times to repeat the input string. + /// + /// 2 + [DefaultValue(3)] + public int Repeat { get; set; } +} diff --git a/Frends.TestTask.DoNothing/Frends.TestTask.DoNothing/Definitions/Options.cs b/Frends.TestTask.DoNothing/Frends.TestTask.DoNothing/Definitions/Options.cs new file mode 100644 index 0000000..bab42ef --- /dev/null +++ b/Frends.TestTask.DoNothing/Frends.TestTask.DoNothing/Definitions/Options.cs @@ -0,0 +1,33 @@ +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; + +namespace Frends.TestTask.DoNothing.Definitions; + +/// +/// Additional parameters. +/// +public class Options +{ + /// + /// Delimiter to use between the repeated strings. + /// + /// , + [DisplayFormat(DataFormatString = "Text")] + [DefaultValue(" ")] + public string Delimiter { get; set; } + + /// + /// Whether to throw an error on failure. + /// + /// true + [DefaultValue(true)] + public bool ThrowErrorOnFailure { get; set; } = true; + + /// + /// Overrides the error message on failure. + /// + /// Custom error message + [DisplayFormat(DataFormatString = "Text")] + [DefaultValue("")] + public string ErrorMessageOnFailure { get; set; } = string.Empty; +} diff --git a/Frends.TestTask.DoNothing/Frends.TestTask.DoNothing/Definitions/Result.cs b/Frends.TestTask.DoNothing/Frends.TestTask.DoNothing/Definitions/Result.cs new file mode 100644 index 0000000..48b1c0b --- /dev/null +++ b/Frends.TestTask.DoNothing/Frends.TestTask.DoNothing/Definitions/Result.cs @@ -0,0 +1,19 @@ +namespace Frends.TestTask.DoNothing.Definitions; + +/// +/// Result class for the DoNothing task. +/// +public class Result +{ + /// + /// Indicates if the task completed successfully. + /// + /// true + public bool Success { get; set; } + + /// + /// Error that occurred during task execution. + /// + /// object { string Message, Exception AdditionalInfo } + public Error Error { get; set; } +} diff --git a/Frends.TestTask.DoNothing/Frends.TestTask.DoNothing/Frends.TestTask.DoNothing.cs b/Frends.TestTask.DoNothing/Frends.TestTask.DoNothing/Frends.TestTask.DoNothing.cs index ed79db6..2033de1 100644 --- a/Frends.TestTask.DoNothing/Frends.TestTask.DoNothing/Frends.TestTask.DoNothing.cs +++ b/Frends.TestTask.DoNothing/Frends.TestTask.DoNothing/Frends.TestTask.DoNothing.cs @@ -1,4 +1,8 @@ -namespace Frends.TestTask.DoNothing; +using System.ComponentModel; +using System.Threading; +using Frends.TestTask.DoNothing.Definitions; + +namespace Frends.TestTask.DoNothing; /// /// docs @@ -6,11 +10,18 @@ public static class TestTask { /// - /// Not a real task. + /// TaskDescription + /// [Documentation](https://tasks.frends.com/tasks/frends-tasks/Party-Echo-Execute) /// - /// foo - public static bool DoNothing() + /// Essential parameters. + /// Additional parameters. + /// A cancellation token provided by Frends Platform. + /// object { bool Success, string Output, object Error { string Message, Exception AdditionalInfo } } + public static Result DoNothing( + [PropertyTab] Input input, + [PropertyTab] Options options, + CancellationToken cancellationToken) { - return true; + return new Result(); } } From f9c2a1ccf52b1f767cb3e8dd30ef6ca93f282f83 Mon Sep 17 00:00:00 2001 From: Mateusz Noga-Wojtania Date: Thu, 24 Sep 2026 14:17:14 +0200 Subject: [PATCH 06/14] fix testts --- .github/workflows/DoNothing_build_and_test_on_push.yml | 2 +- .../Frends.TestTask.DoNothing.Tests/UnitTests.cs | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/DoNothing_build_and_test_on_push.yml b/.github/workflows/DoNothing_build_and_test_on_push.yml index e59d28e..2c182ec 100644 --- a/.github/workflows/DoNothing_build_and_test_on_push.yml +++ b/.github/workflows/DoNothing_build_and_test_on_push.yml @@ -19,4 +19,4 @@ jobs: secrets: badge_service_api_key: ${{ secrets.BADGE_SERVICE_API_KEY }} test_feed_api_key: ${{ secrets.TASKS_TEST_FEED_API_KEY }} - env_vars: '{"username": ${{ toJSON(secrets.USERNAME) }}}' + env_vars: '{"FOO": ${{ toJSON(secrets.FOO) }}}' diff --git a/Frends.TestTask.DoNothing/Frends.TestTask.DoNothing.Tests/UnitTests.cs b/Frends.TestTask.DoNothing/Frends.TestTask.DoNothing.Tests/UnitTests.cs index c09219f..bcc7ece 100644 --- a/Frends.TestTask.DoNothing/Frends.TestTask.DoNothing.Tests/UnitTests.cs +++ b/Frends.TestTask.DoNothing/Frends.TestTask.DoNothing.Tests/UnitTests.cs @@ -1,3 +1,4 @@ +using System; using System.Threading; using Frends.TestTask.DoNothing.Definitions; using NUnit.Framework; @@ -10,8 +11,12 @@ public class TestTaskTests [Test] public void DoNothingTest() { + var username = Environment.GetEnvironmentVariable("FOO"); + var result = TestTask.DoNothing(new Input(), new Options(), CancellationToken.None); - Assert.IsTrue(result.Success); + + Assert.IsFalse(result.Success); + Assert.That(username, Is.EqualTo("bar")); } } } From 3f48e1e590c9dd04656c80dcceb61ce52e232e63 Mon Sep 17 00:00:00 2001 From: Mateusz Noga-Wojtania Date: Thu, 24 Sep 2026 14:26:55 +0200 Subject: [PATCH 07/14] coverage --- .../UnitTests.cs | 50 +++++++++++++++++++ 1 file changed, 50 insertions(+) diff --git a/Frends.TestTask.DoNothing/Frends.TestTask.DoNothing.Tests/UnitTests.cs b/Frends.TestTask.DoNothing/Frends.TestTask.DoNothing.Tests/UnitTests.cs index bcc7ece..44abf15 100644 --- a/Frends.TestTask.DoNothing/Frends.TestTask.DoNothing.Tests/UnitTests.cs +++ b/Frends.TestTask.DoNothing/Frends.TestTask.DoNothing.Tests/UnitTests.cs @@ -18,5 +18,55 @@ public void DoNothingTest() Assert.IsFalse(result.Success); Assert.That(username, Is.EqualTo("bar")); } + + [Test] + public void DoNothingTest_WithFullyPopulatedParameters() + { + var input = new Input + { + Content = "foobar", + Repeat = 2, + }; + + var options = new Options + { + Delimiter = ",", + ThrowErrorOnFailure = false, + ErrorMessageOnFailure = "Custom error message", + }; + + var result = TestTask.DoNothing(input, options, CancellationToken.None); + + Assert.IsFalse(result.Success); + Assert.IsNull(result.Error); + + Assert.That(input.Content, Is.EqualTo("foobar")); + Assert.That(input.Repeat, Is.EqualTo(2)); + Assert.That(options.Delimiter, Is.EqualTo(",")); + Assert.IsFalse(options.ThrowErrorOnFailure); + Assert.That(options.ErrorMessageOnFailure, Is.EqualTo("Custom error message")); + } + + [Test] + public void ResultTest_SuccessAndErrorCanBeSetAndRead() + { + var exception = new InvalidOperationException("Something went wrong."); + var error = new Error + { + Message = "Unable to join strings.", + AdditionalInfo = exception, + }; + + var result = new Result + { + Success = true, + Error = error, + }; + + Assert.IsTrue(result.Success); + Assert.That(result.Error, Is.Not.Null); + Assert.That(result.Error.Message, Is.EqualTo("Unable to join strings.")); + Assert.That(result.Error.AdditionalInfo, Is.SameAs(exception)); + } } } From 444373c1358a88aba3a1668985d8a03694e19f9b Mon Sep 17 00:00:00 2001 From: Mateusz Noga-Wojtania Date: Thu, 24 Sep 2026 14:30:27 +0200 Subject: [PATCH 08/14] ad migration file --- .../Frends.TestTask.DoNothing/migration.json | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 Frends.TestTask.DoNothing/Frends.TestTask.DoNothing/migration.json diff --git a/Frends.TestTask.DoNothing/Frends.TestTask.DoNothing/migration.json b/Frends.TestTask.DoNothing/Frends.TestTask.DoNothing/migration.json new file mode 100644 index 0000000..a01c477 --- /dev/null +++ b/Frends.TestTask.DoNothing/Frends.TestTask.DoNothing/migration.json @@ -0,0 +1,6 @@ +[ + { + "Task": "Frends.TestTask.DoNothing", + "Migrations": [] + } +] \ No newline at end of file From f238e6c5c9e4f10028b8f0141dc008364751664d Mon Sep 17 00:00:00 2001 From: Mateusz Noga-Wojtania Date: Thu, 24 Sep 2026 14:33:02 +0200 Subject: [PATCH 09/14] both testing --- .github/workflows/DoNothing_build_and_test_on_push.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/DoNothing_build_and_test_on_push.yml b/.github/workflows/DoNothing_build_and_test_on_push.yml index 2c182ec..98ef4e6 100644 --- a/.github/workflows/DoNothing_build_and_test_on_push.yml +++ b/.github/workflows/DoNothing_build_and_test_on_push.yml @@ -14,7 +14,7 @@ jobs: build: uses: FrendsPlatform/FrendsTasks/.github/workflows/collective_build.yml@workflows-update with: - os: lin + os: all workdir: Frends.TestTask.DoNothing secrets: badge_service_api_key: ${{ secrets.BADGE_SERVICE_API_KEY }} From 00e2053b47bce83a281fcc5aaba8660f2780fce1 Mon Sep 17 00:00:00 2001 From: Mateusz Noga-Wojtania Date: Thu, 24 Sep 2026 16:03:17 +0200 Subject: [PATCH 10/14] change workflow inputs --- .github/workflows/DoNothing_build_and_test_on_push.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/DoNothing_build_and_test_on_push.yml b/.github/workflows/DoNothing_build_and_test_on_push.yml index 98ef4e6..ebc3083 100644 --- a/.github/workflows/DoNothing_build_and_test_on_push.yml +++ b/.github/workflows/DoNothing_build_and_test_on_push.yml @@ -18,5 +18,7 @@ jobs: workdir: Frends.TestTask.DoNothing secrets: badge_service_api_key: ${{ secrets.BADGE_SERVICE_API_KEY }} - test_feed_api_key: ${{ secrets.TASKS_TEST_FEED_API_KEY }} + + target_feed_url: 'https://pkgs.dev.azure.com/frends-platform/frends-tasks/_packaging/test/nuget/v3/index.json' + target_feed_api_key: ${{ secrets.TASKS_TEST_FEED_API_KEY }} env_vars: '{"FOO": ${{ toJSON(secrets.FOO) }}}' From 70082036a3bdd3f1cf3c6ab7fcbcf630b1f6f94a Mon Sep 17 00:00:00 2001 From: Mateusz Noga-Wojtania Date: Thu, 24 Sep 2026 16:45:26 +0200 Subject: [PATCH 11/14] remove feed url --- .github/workflows/DoNothing_build_and_test_on_push.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/DoNothing_build_and_test_on_push.yml b/.github/workflows/DoNothing_build_and_test_on_push.yml index ebc3083..2412c04 100644 --- a/.github/workflows/DoNothing_build_and_test_on_push.yml +++ b/.github/workflows/DoNothing_build_and_test_on_push.yml @@ -19,6 +19,5 @@ jobs: secrets: badge_service_api_key: ${{ secrets.BADGE_SERVICE_API_KEY }} - target_feed_url: 'https://pkgs.dev.azure.com/frends-platform/frends-tasks/_packaging/test/nuget/v3/index.json' target_feed_api_key: ${{ secrets.TASKS_TEST_FEED_API_KEY }} env_vars: '{"FOO": ${{ toJSON(secrets.FOO) }}}' From 9eef81c87930cce96828695d27cfb2bda6c0a7a6 Mon Sep 17 00:00:00 2001 From: Mateusz Noga-Wojtania Date: Thu, 24 Sep 2026 23:40:05 +0200 Subject: [PATCH 12/14] final test? --- .../DoNothing_build_and_test_on_main.yml | 23 +++++++++---------- .../DoNothing_build_and_test_on_push.yml | 10 +++++--- .github/workflows/DoNothing_release.yml | 15 ++++++++---- .../Frends.TestTask.DoNothing.cs | 2 +- .../Frends.TestTask.DoNothing.csproj | 8 +++---- 5 files changed, 34 insertions(+), 24 deletions(-) diff --git a/.github/workflows/DoNothing_build_and_test_on_main.yml b/.github/workflows/DoNothing_build_and_test_on_main.yml index 777fe2b..313d1b5 100644 --- a/.github/workflows/DoNothing_build_and_test_on_main.yml +++ b/.github/workflows/DoNothing_build_and_test_on_main.yml @@ -2,24 +2,23 @@ name: DoNothing Main on: push: - branches: + branches: - main paths: - 'Frends.TestTask.DoNothing/**' + - '.github/workflows/**' workflow_dispatch: - jobs: - linux_build: - name: build on linux - uses: FrendsPlatform/FrendsTasks/.github/workflows/linux_build_main.yml@main + build: + uses: FrendsPlatform/FrendsTasks/.github/workflows/official_task_pipeline.yml@workflows-update with: + workflow_mode: main + os: all workdir: Frends.TestTask.DoNothing secrets: badge_service_api_key: ${{ secrets.BADGE_SERVICE_API_KEY }} - windows_build: - name: build on windows - uses: FrendsPlatform/FrendsTasks/.github/workflows/build_main.yml@main - with: - workdir: Frends.TestTask.DoNothing - secrets: - badge_service_api_key: ${{ secrets.BADGE_SERVICE_API_KEY }} \ No newline at end of file + env_vars: | + { + "FOO": ${{ toJSON(secrets.FOO) }}, + "BAR": ${{ toJSON(secrets.BAR) }} + } \ No newline at end of file diff --git a/.github/workflows/DoNothing_build_and_test_on_push.yml b/.github/workflows/DoNothing_build_and_test_on_push.yml index 2412c04..2caf656 100644 --- a/.github/workflows/DoNothing_build_and_test_on_push.yml +++ b/.github/workflows/DoNothing_build_and_test_on_push.yml @@ -12,12 +12,16 @@ on: jobs: build: - uses: FrendsPlatform/FrendsTasks/.github/workflows/collective_build.yml@workflows-update + uses: FrendsPlatform/FrendsTasks/.github/workflows/official_task_pipeline.yml@workflows-update with: + workflow_mode: work os: all workdir: Frends.TestTask.DoNothing secrets: badge_service_api_key: ${{ secrets.BADGE_SERVICE_API_KEY }} - target_feed_api_key: ${{ secrets.TASKS_TEST_FEED_API_KEY }} - env_vars: '{"FOO": ${{ toJSON(secrets.FOO) }}}' + env_vars: | + { + "FOO": ${{ toJSON(secrets.FOO) }}, + "BAR": ${{ toJSON(secrets.BAR) }} + } diff --git a/.github/workflows/DoNothing_release.yml b/.github/workflows/DoNothing_release.yml index 7dd1e47..5a6202b 100644 --- a/.github/workflows/DoNothing_release.yml +++ b/.github/workflows/DoNothing_release.yml @@ -2,13 +2,20 @@ name: DoNothing Release on: workflow_dispatch: - jobs: build: - uses: FrendsPlatform/FrendsTasks/.github/workflows/release.yml@dont-push-symbols-on-release + uses: FrendsPlatform/FrendsTasks/.github/workflows/official_task_pipeline.yml@workflows-update with: + workflow_mode: release + os: all workdir: Frends.TestTask.DoNothing secrets: - feed_api_key: ${{ secrets.TASKS_FEED_API_KEY }} - \ No newline at end of file + badge_service_api_key: ${{ secrets.BADGE_SERVICE_API_KEY }} + target_feed_api_key: ${{ secrets.TASKS_FEED_API_KEY }} + source_nuget_feed_url: ${{ secrets.TASKS_FEED_URL }} + env_vars: | + { + "FOO": ${{ toJSON(secrets.FOO) }}, + "BAR": ${{ toJSON(secrets.BAR) }} + } \ No newline at end of file diff --git a/Frends.TestTask.DoNothing/Frends.TestTask.DoNothing/Frends.TestTask.DoNothing.cs b/Frends.TestTask.DoNothing/Frends.TestTask.DoNothing/Frends.TestTask.DoNothing.cs index 2033de1..d97cf35 100644 --- a/Frends.TestTask.DoNothing/Frends.TestTask.DoNothing/Frends.TestTask.DoNothing.cs +++ b/Frends.TestTask.DoNothing/Frends.TestTask.DoNothing/Frends.TestTask.DoNothing.cs @@ -10,7 +10,7 @@ namespace Frends.TestTask.DoNothing; public static class TestTask { /// - /// TaskDescription + /// This is not a proper Frends task, it is only for testing build and publish pipelines. /// [Documentation](https://tasks.frends.com/tasks/frends-tasks/Party-Echo-Execute) /// /// Essential parameters. diff --git a/Frends.TestTask.DoNothing/Frends.TestTask.DoNothing/Frends.TestTask.DoNothing.csproj b/Frends.TestTask.DoNothing/Frends.TestTask.DoNothing/Frends.TestTask.DoNothing.csproj index eb1176f..8f6b20b 100644 --- a/Frends.TestTask.DoNothing/Frends.TestTask.DoNothing/Frends.TestTask.DoNothing.csproj +++ b/Frends.TestTask.DoNothing/Frends.TestTask.DoNothing/Frends.TestTask.DoNothing.csproj @@ -3,7 +3,7 @@ net8.0 latest - 1.0.0 + 1.1.0 Frends Frends Frends @@ -11,7 +11,7 @@ Frends MIT true - TaskDescription + This is not a proper Frends task, it is only for testing build and publish pipelines. https://frends.com/ https://github.com/FrendsPlatform/Frends.TestTask/tree/main/Frends.TestTask.DoNothing disable @@ -37,8 +37,8 @@ - + CopyToOutputDirectory="PreserveNewest"/> + From dde1fe8e4e775fe5e694cdbb72dd7e8fe74ff39d Mon Sep 17 00:00:00 2001 From: Mateusz Noga-Wojtania Date: Thu, 1 Oct 2026 11:11:07 +0200 Subject: [PATCH 13/14] test workflow --- .../workflows/DoNothing_build_and_test_on_main.yml | 4 +++- .../workflows/DoNothing_build_and_test_on_push.yml | 4 +++- .github/workflows/DoNothing_release.yml | 12 ++++-------- .../Frends.TestTask.DoNothing.csproj | 2 +- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/workflows/DoNothing_build_and_test_on_main.yml b/.github/workflows/DoNothing_build_and_test_on_main.yml index 313d1b5..d100f9c 100644 --- a/.github/workflows/DoNothing_build_and_test_on_main.yml +++ b/.github/workflows/DoNothing_build_and_test_on_main.yml @@ -1,4 +1,6 @@ name: DoNothing Main +permissions: + contents: read on: push: @@ -10,7 +12,7 @@ on: workflow_dispatch: jobs: build: - uses: FrendsPlatform/FrendsTasks/.github/workflows/official_task_pipeline.yml@workflows-update + uses: FrendsPlatform/FrendsTasks/.github/workflows/official_task_pipeline.yml@hot-fix with: workflow_mode: main os: all diff --git a/.github/workflows/DoNothing_build_and_test_on_push.yml b/.github/workflows/DoNothing_build_and_test_on_push.yml index 2caf656..cd1ba77 100644 --- a/.github/workflows/DoNothing_build_and_test_on_push.yml +++ b/.github/workflows/DoNothing_build_and_test_on_push.yml @@ -1,4 +1,6 @@ name: DoNothing Test +permissions: + contents: read on: push: @@ -12,7 +14,7 @@ on: jobs: build: - uses: FrendsPlatform/FrendsTasks/.github/workflows/official_task_pipeline.yml@workflows-update + uses: FrendsPlatform/FrendsTasks/.github/workflows/official_task_pipeline.yml@hot-fix with: workflow_mode: work os: all diff --git a/.github/workflows/DoNothing_release.yml b/.github/workflows/DoNothing_release.yml index 5a6202b..2505606 100644 --- a/.github/workflows/DoNothing_release.yml +++ b/.github/workflows/DoNothing_release.yml @@ -1,21 +1,17 @@ name: DoNothing Release +permissions: + contents: write on: workflow_dispatch: jobs: build: - uses: FrendsPlatform/FrendsTasks/.github/workflows/official_task_pipeline.yml@workflows-update + uses: FrendsPlatform/FrendsTasks/.github/workflows/official_task_pipeline.yml@hot-fix with: workflow_mode: release os: all workdir: Frends.TestTask.DoNothing secrets: badge_service_api_key: ${{ secrets.BADGE_SERVICE_API_KEY }} - target_feed_api_key: ${{ secrets.TASKS_FEED_API_KEY }} - source_nuget_feed_url: ${{ secrets.TASKS_FEED_URL }} - env_vars: | - { - "FOO": ${{ toJSON(secrets.FOO) }}, - "BAR": ${{ toJSON(secrets.BAR) }} - } \ No newline at end of file + target_feed_api_key: ${{ secrets.TASKS_FEED_API_KEY }} \ No newline at end of file diff --git a/Frends.TestTask.DoNothing/Frends.TestTask.DoNothing/Frends.TestTask.DoNothing.csproj b/Frends.TestTask.DoNothing/Frends.TestTask.DoNothing/Frends.TestTask.DoNothing.csproj index 8f6b20b..f26656c 100644 --- a/Frends.TestTask.DoNothing/Frends.TestTask.DoNothing/Frends.TestTask.DoNothing.csproj +++ b/Frends.TestTask.DoNothing/Frends.TestTask.DoNothing/Frends.TestTask.DoNothing.csproj @@ -3,7 +3,7 @@ net8.0 latest - 1.1.0 + 1.1.1 Frends Frends Frends From 16082668f535c81f22f158b51b321eb697e63e64 Mon Sep 17 00:00:00 2001 From: Mateusz Noga-Wojtania Date: Thu, 1 Oct 2026 11:34:58 +0200 Subject: [PATCH 14/14] bump versions --- .../Frends.TestTask.DoNothing.Tests.csproj | 8 ++++---- .../Frends.TestTask.DoNothing.Tests/UnitTests.cs | 10 +++++----- .../Frends.TestTask.DoNothing.csproj | 2 +- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/Frends.TestTask.DoNothing/Frends.TestTask.DoNothing.Tests/Frends.TestTask.DoNothing.Tests.csproj b/Frends.TestTask.DoNothing/Frends.TestTask.DoNothing.Tests/Frends.TestTask.DoNothing.Tests.csproj index 2cd4030..bd88333 100644 --- a/Frends.TestTask.DoNothing/Frends.TestTask.DoNothing.Tests/Frends.TestTask.DoNothing.Tests.csproj +++ b/Frends.TestTask.DoNothing/Frends.TestTask.DoNothing.Tests/Frends.TestTask.DoNothing.Tests.csproj @@ -7,10 +7,10 @@ - - - - + + + + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/Frends.TestTask.DoNothing/Frends.TestTask.DoNothing.Tests/UnitTests.cs b/Frends.TestTask.DoNothing/Frends.TestTask.DoNothing.Tests/UnitTests.cs index 44abf15..3b1a26a 100644 --- a/Frends.TestTask.DoNothing/Frends.TestTask.DoNothing.Tests/UnitTests.cs +++ b/Frends.TestTask.DoNothing/Frends.TestTask.DoNothing.Tests/UnitTests.cs @@ -15,7 +15,7 @@ public void DoNothingTest() var result = TestTask.DoNothing(new Input(), new Options(), CancellationToken.None); - Assert.IsFalse(result.Success); + Assert.That(result.Success, Is.False); Assert.That(username, Is.EqualTo("bar")); } @@ -37,13 +37,13 @@ public void DoNothingTest_WithFullyPopulatedParameters() var result = TestTask.DoNothing(input, options, CancellationToken.None); - Assert.IsFalse(result.Success); - Assert.IsNull(result.Error); + Assert.That(result.Success, Is.False); + Assert.That(result.Error, Is.Null); Assert.That(input.Content, Is.EqualTo("foobar")); Assert.That(input.Repeat, Is.EqualTo(2)); Assert.That(options.Delimiter, Is.EqualTo(",")); - Assert.IsFalse(options.ThrowErrorOnFailure); + Assert.That(options.ThrowErrorOnFailure, Is.False); Assert.That(options.ErrorMessageOnFailure, Is.EqualTo("Custom error message")); } @@ -63,7 +63,7 @@ public void ResultTest_SuccessAndErrorCanBeSetAndRead() Error = error, }; - Assert.IsTrue(result.Success); + Assert.That(result.Success, Is.True); Assert.That(result.Error, Is.Not.Null); Assert.That(result.Error.Message, Is.EqualTo("Unable to join strings.")); Assert.That(result.Error.AdditionalInfo, Is.SameAs(exception)); diff --git a/Frends.TestTask.DoNothing/Frends.TestTask.DoNothing/Frends.TestTask.DoNothing.csproj b/Frends.TestTask.DoNothing/Frends.TestTask.DoNothing/Frends.TestTask.DoNothing.csproj index f26656c..3878049 100644 --- a/Frends.TestTask.DoNothing/Frends.TestTask.DoNothing/Frends.TestTask.DoNothing.csproj +++ b/Frends.TestTask.DoNothing/Frends.TestTask.DoNothing/Frends.TestTask.DoNothing.csproj @@ -42,7 +42,7 @@ - +