From 1a728a57ab5e9fb1cd3bd46b4e1056755bfbaafe Mon Sep 17 00:00:00 2001 From: Tom Smith Date: Fri, 2 May 2025 15:02:51 +0100 Subject: [PATCH 1/7] Edit to README to create PR for PR workflow test --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index bdbabe2..c46e84b 100644 --- a/README.md +++ b/README.md @@ -1 +1,3 @@ -# test_github_actions \ No newline at end of file +# test_github_actions + +Adding test text to the README for the PR to see if the workflow triggers \ No newline at end of file From e408f801acc9e4910a4e3c3f1c3d9e8e0285f5c2 Mon Sep 17 00:00:00 2001 From: Tom Smith Date: Fri, 2 May 2025 15:06:01 +0100 Subject: [PATCH 2/7] Delete .net pr workflow --- .github/workflows/pr-build-test.yml | 60 ----------------------------- 1 file changed, 60 deletions(-) delete mode 100644 .github/workflows/pr-build-test.yml diff --git a/.github/workflows/pr-build-test.yml b/.github/workflows/pr-build-test.yml deleted file mode 100644 index 2617bf6..0000000 --- a/.github/workflows/pr-build-test.yml +++ /dev/null @@ -1,60 +0,0 @@ -name: PR - Build / Test - -on: - pull_request: - branches: - - main - workflow_dispatch: - -jobs: - build: - runs-on: ubuntu-latest - - steps: - - name: Checkout code - uses: actions/checkout@v4 - - - name: Setup .NET Core - uses: actions/setup-dotnet@v4.1.0 - with: - dotnet-version: "8.0.x" - - - name: Restore dependencies - run: dotnet restore "${{github.workspace}}/src/my-web-app.sln" - - - name: Build - run: dotnet build "${{github.workspace}}/src/my-web-app.sln" --no-restore --configuration Release - - - name: Test - run: dotnet test "${{github.workspace}}/src/my-web-app.sln" --no-restore --logger:"junit;LogFilePath=${{ github.workspace }}/results/test-results.xml" - - # create a test summary markdown file - # if you don't specify an output file, it will automatically add - # as a job summary. If you specify an output file, you have to - # create your own step of adding it to the job summary. I am - # intentionally doing that to show job summaries - - name: Create test summary - uses: test-summary/action@v2.4 - with: - paths: ${{ github.workspace }}/results/*.xml - output: ${{ github.workspace }}/results/summary.md - show: "all" - if: always() - - # I am adding the test results to the Job Summary - - name: Add Test Results To Job Summary - run: | - echo "TEST RESULTS:" >> $GITHUB_STEP_SUMMARY - echo "" >> $GITHUB_STEP_SUMMARY # this is a blank line - cat "${{ github.workspace }}/results/summary.md" >> $GITHUB_STEP_SUMMARY - if: always() - - - name: Publish - run: dotnet publish "${{github.workspace}}/src/my-web-app/my-web-app.csproj" -c Release -o mywebapp - - - name: Upload build artifact - uses: actions/upload-artifact@v4 - with: - name: myapp - path: mywebapp/** - if-no-files-found: error From 12623b6cba71378323a5ce115c5f2d0081e0b635 Mon Sep 17 00:00:00 2001 From: Tom Smith Date: Fri, 2 May 2025 15:17:16 +0100 Subject: [PATCH 3/7] Another trigger comment --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index c46e84b..5d10065 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,5 @@ # test_github_actions -Adding test text to the README for the PR to see if the workflow triggers \ No newline at end of file +Adding test text to the README for the PR to see if the workflow triggers + +Here is another trigger comment \ No newline at end of file From 9c00a2917775c26b9191f318a8a49c10250112ac Mon Sep 17 00:00:00 2001 From: Tom Smith Date: Fri, 2 May 2025 15:20:17 +0100 Subject: [PATCH 4/7] Third trigger --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 5d10065..f869dce 100644 --- a/README.md +++ b/README.md @@ -2,4 +2,6 @@ Adding test text to the README for the PR to see if the workflow triggers -Here is another trigger comment \ No newline at end of file +Here is another trigger comment + +Third trigger \ No newline at end of file From 7008a6952d61df2985c6c62f7c76f9afb20a89d3 Mon Sep 17 00:00:00 2001 From: Tom Smith Date: Fri, 2 May 2025 15:23:28 +0100 Subject: [PATCH 5/7] Removed lines from README --- README.md | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/README.md b/README.md index f869dce..c46e84b 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,3 @@ # test_github_actions -Adding test text to the README for the PR to see if the workflow triggers - -Here is another trigger comment - -Third trigger \ No newline at end of file +Adding test text to the README for the PR to see if the workflow triggers \ No newline at end of file From cab5a264dba82dd97c96f36861266182924548cf Mon Sep 17 00:00:00 2001 From: Tom Smith Date: Tue, 6 May 2025 14:15:53 +0100 Subject: [PATCH 6/7] Change to failing test to test required workflow --- tests/test_math_utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_math_utils.py b/tests/test_math_utils.py index e95ac1e..84fe48b 100644 --- a/tests/test_math_utils.py +++ b/tests/test_math_utils.py @@ -3,7 +3,7 @@ def test_divide_positive_numbers() -> None: """Test that divide returns the correct result when given two numbers.""" - assert divide(1, 2) == 0.5 + assert divide(1, 2) == 0.4 def test_divide_negative_numbers() -> None: From 469fe9ef82442fcf785c2f2182069abad40319aa Mon Sep 17 00:00:00 2001 From: Tom Smith Date: Tue, 6 May 2025 14:17:40 +0100 Subject: [PATCH 7/7] Fixed tests --- tests/test_math_utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_math_utils.py b/tests/test_math_utils.py index 84fe48b..e95ac1e 100644 --- a/tests/test_math_utils.py +++ b/tests/test_math_utils.py @@ -3,7 +3,7 @@ def test_divide_positive_numbers() -> None: """Test that divide returns the correct result when given two numbers.""" - assert divide(1, 2) == 0.4 + assert divide(1, 2) == 0.5 def test_divide_negative_numbers() -> None: