Skip to content

Commit f1b7ca4

Browse files
Merge pull request #8 from miguelmartens/add/ci-build
Add/ci build
2 parents 8388c5f + 0876698 commit f1b7ca4

2 files changed

Lines changed: 40 additions & 0 deletions

File tree

.github/workflows/README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,21 @@ Scans the repository for secrets and sensitive information that may have been ac
2222

2323
**Tip:** Never commit real secrets; use placeholders in committed files and store actual secrets outside the repo.
2424

25+
### Build
26+
27+
Builds the Go binary and runs tests. Must succeed before merging into `main`.
28+
29+
**Triggers:**
30+
- Push to `main`
31+
- Pull requests targeting `main`
32+
33+
**What it does:**
34+
- Sets up Go using the version from `go.mod`
35+
- Runs `go build -o bin/cowardly ./cmd/cowardly`
36+
- Runs `go test ./...`
37+
38+
**Local:** Run `make build` to build, `make test` to test, or `make run` to build and run the TUI.
39+
2540
### Prettier
2641

2742
Checks that Markdown, JSON, YAML, and other supported files are formatted according to [Prettier](https://prettier.io/).

.github/workflows/build.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: build
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout
14+
uses: actions/checkout@v6
15+
16+
- name: Set up Go
17+
uses: actions/setup-go@v6
18+
with:
19+
go-version-file: go.mod
20+
21+
- name: Build
22+
run: go build -o bin/cowardly ./cmd/cowardly
23+
24+
- name: Test
25+
run: go test ./...

0 commit comments

Comments
 (0)