From 93a64e995d1b8ae508805f2f8263a096238256f6 Mon Sep 17 00:00:00 2001 From: dev-kojo-cmd Date: Sat, 18 Apr 2026 23:47:55 +0000 Subject: [PATCH 1/3] update yaml file --- .github/workflows/ci-cd.yaml | 11 +++++++++++ mathops.go | 4 ++++ 2 files changed, 15 insertions(+) diff --git a/.github/workflows/ci-cd.yaml b/.github/workflows/ci-cd.yaml index 08b257a..30c4d13 100644 --- a/.github/workflows/ci-cd.yaml +++ b/.github/workflows/ci-cd.yaml @@ -15,5 +15,16 @@ jobs: go-version: '1.25.4' - name: Run tests run: go test -v ./... + build: + runs-on: ubuntu-latest + needs: tests + steps: + - uses: actions/checkout@v4 + - name: Set up Go + uses: actions/setup-go@v6 + with: + go-version: '1.25.4' + - name: Build the application + run: go build -v ./... diff --git a/mathops.go b/mathops.go index d9d42fc..b491158 100644 --- a/mathops.go +++ b/mathops.go @@ -1,5 +1,9 @@ package main +func main() { + // Example usage of the functions + println(Add(5, 3)) // Output: 8 +} // Add returns the sum of two integers. func Add(a, b int) int { return a + b From 5e17b04278d4b040d1972c99967d949e9d050d69 Mon Sep 17 00:00:00 2001 From: dev-kojo-cmd Date: Sat, 18 Apr 2026 23:50:46 +0000 Subject: [PATCH 2/3] add tests --- mathops_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mathops_test.go b/mathops_test.go index a27c705..d35a941 100644 --- a/mathops_test.go +++ b/mathops_test.go @@ -73,7 +73,7 @@ func TestDisplayName(t *testing.T) { input string want string }{ - {name: "regular name", input: "Alice", want: "Hello, Alices!"}, + {name: "regular name", input: "Alice", want: "Hello, Alice!"}, {name: "empty name", input: "", want: "Hello, !"}, } From 9c0b613611d82888d252780d43e940ffe4c05f49 Mon Sep 17 00:00:00 2001 From: dev-kojo-cmd Date: Sun, 19 Apr 2026 00:09:26 +0000 Subject: [PATCH 3/3] add manually trigger --- .github/workflows/ci-cd.yaml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.github/workflows/ci-cd.yaml b/.github/workflows/ci-cd.yaml index 30c4d13..1931b48 100644 --- a/.github/workflows/ci-cd.yaml +++ b/.github/workflows/ci-cd.yaml @@ -4,7 +4,13 @@ on: branches: [ main ] pull_request: branches: [ main ] + workflow_dispatch: jobs: + info: + runs-on: ubuntu-latest + steps: + - name: Show GitHub context + run: echo "${{ toJson(github) }}" tests: runs-on: ubuntu-latest steps: @@ -15,6 +21,9 @@ jobs: go-version: '1.25.4' - name: Run tests run: go test -v ./... + + + build: runs-on: ubuntu-latest needs: tests @@ -26,5 +35,7 @@ jobs: go-version: '1.25.4' - name: Build the application run: go build -v ./... + +