From ed43ce39dc4e3a358947b5461c4236f5e8445241 Mon Sep 17 00:00:00 2001 From: Asher-Lahm Date: Fri, 21 Mar 2025 12:07:50 -0500 Subject: [PATCH 01/12] test change --- Console/Program.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Console/Program.cs b/Console/Program.cs index 9be02228..6cb6548f 100644 --- a/Console/Program.cs +++ b/Console/Program.cs @@ -43,7 +43,7 @@ static void Main(string[] args) default: throw new ArgumentException("You did not select a valid option!"); } - + //change for a test push var x = GetInput("Enter x: "); var y = GetInput("Enter y: "); var result = operation(x, y); From e4517cd3216b54d5f37ac716e024263c02f5f78e Mon Sep 17 00:00:00 2001 From: Asher-Lahm Date: Fri, 21 Mar 2025 12:11:36 -0500 Subject: [PATCH 02/12] Added code to build the app to run-app.yaml --- .github/workflows/run-app.yaml | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/.github/workflows/run-app.yaml b/.github/workflows/run-app.yaml index 6ec58bc2..5ff2b6ea 100644 --- a/.github/workflows/run-app.yaml +++ b/.github/workflows/run-app.yaml @@ -1,10 +1,19 @@ -name: 'Basic Action' +name: 'Run App Asher Lahm' -on: [push] +on: [push, pull_request] jobs: check-bats-version: runs-on: ubuntu-latest steps: - - name: Basic Action - run: echo "Hello, World!" \ No newline at end of file + - uses: actions/checkout@v2 + - uses: actions/setup-dotnet@v1 + with: + dotnet-version: '5.0.301' + - uses: nuget/setup-nuget@v1 + - name: Nuget Restore + run: nuget restore GithubActions.sln + - name: Install dependencies + run: dotnet restore GithubActions.sln + - name: Build + run: msbuild /p:Configuration=Release GithubActions.sln \ No newline at end of file From 0b440be368552a5de4109e92b45d554dc4a171ce Mon Sep 17 00:00:00 2001 From: Asher-Lahm Date: Fri, 21 Mar 2025 12:16:31 -0500 Subject: [PATCH 03/12] Changed status badge url in README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 6a17b113..1ce43826 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -[![Run App](https://github.com/kgerot/GithubActions/actions/workflows/run-app.yaml/badge.svg)](https://github.com/kgerot/GithubActions/actions/workflows/run-app.yaml) +[![Run App Asher Lahm](https://github.com/Asher-Lahm/GithubActions/actions/workflows/run-app.yaml/badge.svg)](https://github.com/Asher-Lahm/GithubActions/actions/workflows/run-app.yaml) # Do not submit a pull request to `kgerot/GithubActions` or `dteske/TraviCI`. Not following this instruction can ruin the lab for others, so pay attention. From de2e5a29dacd64c416a5f31d89ce78799bf768f9 Mon Sep 17 00:00:00 2001 From: Asher-Lahm Date: Fri, 21 Mar 2025 12:24:16 -0500 Subject: [PATCH 04/12] changed run-app.yaml to run unit tests --- .github/workflows/run-app.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/run-app.yaml b/.github/workflows/run-app.yaml index 5ff2b6ea..4699cc51 100644 --- a/.github/workflows/run-app.yaml +++ b/.github/workflows/run-app.yaml @@ -16,4 +16,6 @@ jobs: - name: Install dependencies run: dotnet restore GithubActions.sln - name: Build - run: msbuild /p:Configuration=Release GithubActions.sln \ No newline at end of file + run: msbuild /p:Configuration=Release GithubActions.sln + - name: Run Unit Tests + run: mono ./packages/NUnit.ConsoleRunner.*/tools/nunit3-console.exe ./Tests/bin/Release/Tests.dll \ No newline at end of file From 4073ead453425acaa5bbe66d00ecaf39827e3458 Mon Sep 17 00:00:00 2001 From: Asher-Lahm Date: Fri, 21 Mar 2025 12:24:33 -0500 Subject: [PATCH 05/12] Added functionality to the Power() method. --- Console/Program.cs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Console/Program.cs b/Console/Program.cs index 6cb6548f..e3f82dee 100644 --- a/Console/Program.cs +++ b/Console/Program.cs @@ -80,11 +80,9 @@ public static double Divide(string x, string y) { return double.Parse(x) / double.Parse(y); } - - // Implement this method following a similar pattern as above public static double Power(string x, string y) { - throw new NotImplementedException(); + return Math.Pow(double.Parse(x), double.Parse(y)); } } From 9e7af2f8abd7ce122d364e1f0cff3218825eb3b8 Mon Sep 17 00:00:00 2001 From: Asher-Lahm Date: Fri, 21 Mar 2025 12:47:58 -0500 Subject: [PATCH 06/12] run-app.yaml was updated to install mono so it can run properly --- .github/workflows/run-app.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/run-app.yaml b/.github/workflows/run-app.yaml index 4699cc51..b74530e7 100644 --- a/.github/workflows/run-app.yaml +++ b/.github/workflows/run-app.yaml @@ -11,6 +11,8 @@ jobs: with: dotnet-version: '5.0.301' - uses: nuget/setup-nuget@v1 + - name: Install Mono + run: sudo apt-get install -y mono-complete - name: Nuget Restore run: nuget restore GithubActions.sln - name: Install dependencies From c073f7d6cb59da97bef4a73844841044080dd7ca Mon Sep 17 00:00:00 2001 From: Asher-Lahm Date: Fri, 21 Mar 2025 12:54:14 -0500 Subject: [PATCH 07/12] run-app.yaml now installs ssl libraries --- .github/workflows/run-app.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/run-app.yaml b/.github/workflows/run-app.yaml index b74530e7..5d070f9f 100644 --- a/.github/workflows/run-app.yaml +++ b/.github/workflows/run-app.yaml @@ -13,6 +13,8 @@ jobs: - uses: nuget/setup-nuget@v1 - name: Install Mono run: sudo apt-get install -y mono-complete + - name: Install OpenSSL + run: sudo apt-get update && sudo apt-get install -y libssl-dev - name: Nuget Restore run: nuget restore GithubActions.sln - name: Install dependencies From e4225387c3e0bf10f0ffc55bb74fa7e95c14dd8b Mon Sep 17 00:00:00 2001 From: Asher-Lahm Date: Fri, 21 Mar 2025 12:57:17 -0500 Subject: [PATCH 08/12] removed things that the ai told me to add because I think it may be wrong --- .github/workflows/run-app.yaml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/workflows/run-app.yaml b/.github/workflows/run-app.yaml index 5d070f9f..4699cc51 100644 --- a/.github/workflows/run-app.yaml +++ b/.github/workflows/run-app.yaml @@ -11,10 +11,6 @@ jobs: with: dotnet-version: '5.0.301' - uses: nuget/setup-nuget@v1 - - name: Install Mono - run: sudo apt-get install -y mono-complete - - name: Install OpenSSL - run: sudo apt-get update && sudo apt-get install -y libssl-dev - name: Nuget Restore run: nuget restore GithubActions.sln - name: Install dependencies From 959bc6c840678269384f5e2194dc454714f1100a Mon Sep 17 00:00:00 2001 From: Asher-Lahm Date: Fri, 21 Mar 2025 13:12:18 -0500 Subject: [PATCH 09/12] attempting to run tests with dotnet test instead of mono --- .github/workflows/run-app.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/run-app.yaml b/.github/workflows/run-app.yaml index 4699cc51..7c87d496 100644 --- a/.github/workflows/run-app.yaml +++ b/.github/workflows/run-app.yaml @@ -18,4 +18,4 @@ jobs: - name: Build run: msbuild /p:Configuration=Release GithubActions.sln - name: Run Unit Tests - run: mono ./packages/NUnit.ConsoleRunner.*/tools/nunit3-console.exe ./Tests/bin/Release/Tests.dll \ No newline at end of file + run: dotnet test --configuration Release \ No newline at end of file From e2c3f0d90dc1544b231a3cfce27012a20089a655 Mon Sep 17 00:00:00 2001 From: Asher-Lahm Date: Fri, 21 Mar 2025 13:16:27 -0500 Subject: [PATCH 10/12] hoping using dotnet restore instead of nuget restore will work. --- .github/workflows/run-app.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/run-app.yaml b/.github/workflows/run-app.yaml index 7c87d496..65a85382 100644 --- a/.github/workflows/run-app.yaml +++ b/.github/workflows/run-app.yaml @@ -12,7 +12,7 @@ jobs: dotnet-version: '5.0.301' - uses: nuget/setup-nuget@v1 - name: Nuget Restore - run: nuget restore GithubActions.sln + run: dotnet restore GithubActions.sln - name: Install dependencies run: dotnet restore GithubActions.sln - name: Build From 13567e231bf8e070bd57eb63bee5dcfaee7d9846 Mon Sep 17 00:00:00 2001 From: Asher-Lahm Date: Fri, 21 Mar 2025 13:21:57 -0500 Subject: [PATCH 11/12] using an older version of ubuntu with the correct libraries --- .github/workflows/run-app.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/run-app.yaml b/.github/workflows/run-app.yaml index 65a85382..a49383c6 100644 --- a/.github/workflows/run-app.yaml +++ b/.github/workflows/run-app.yaml @@ -4,7 +4,7 @@ on: [push, pull_request] jobs: check-bats-version: - runs-on: ubuntu-latest + runs-on: ubuntu-20.04 steps: - uses: actions/checkout@v2 - uses: actions/setup-dotnet@v1 From 1dc7bfadf945341809dec00e8748e6a3b4c58803 Mon Sep 17 00:00:00 2001 From: Asher-Lahm Date: Fri, 21 Mar 2025 13:24:58 -0500 Subject: [PATCH 12/12] let's see if this works --- .github/workflows/run-app.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/run-app.yaml b/.github/workflows/run-app.yaml index a49383c6..2c8ab9d5 100644 --- a/.github/workflows/run-app.yaml +++ b/.github/workflows/run-app.yaml @@ -12,10 +12,10 @@ jobs: dotnet-version: '5.0.301' - uses: nuget/setup-nuget@v1 - name: Nuget Restore - run: dotnet restore GithubActions.sln + run: nuget restore GithubActions.sln - name: Install dependencies run: dotnet restore GithubActions.sln - name: Build run: msbuild /p:Configuration=Release GithubActions.sln - name: Run Unit Tests - run: dotnet test --configuration Release \ No newline at end of file + run: mono ./packages/NUnit.ConsoleRunner.*/tools/nunit3-console.exe ./Tests/bin/Release/Tests.dll