Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions .github/workflows/ci-cd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -16,4 +22,20 @@ jobs:
- 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 ./...




4 changes: 4 additions & 0 deletions mathops.go
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion mathops_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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, !"},
}

Expand Down
Loading