Skip to content

Commit c8b9ef6

Browse files
authored
add workflows (#3)
* add workflows * add badges
1 parent ed7b458 commit c8b9ef6

File tree

4 files changed

+72
-21
lines changed

4 files changed

+72
-21
lines changed

.github/workflows/gosec.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: gosec
2+
on:
3+
push:
4+
branches: [main]
5+
pull_request:
6+
branches: [main]
7+
workflow_dispatch:
8+
9+
jobs:
10+
gosec:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v3
14+
15+
- name: Run Gosec Security Scanner
16+
uses: securego/gosec@master
17+
with:
18+
args: ./...

.github/workflows/test.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: test
2+
on:
3+
push:
4+
branches: [main]
5+
pull_request:
6+
branches: [main]
7+
workflow_dispatch:
8+
9+
jobs:
10+
test:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout
14+
uses: actions/checkout@v3
15+
16+
- name: Set up Go
17+
uses: actions/setup-go@v3
18+
with:
19+
go-version: "1.24.0"
20+
21+
- name: Run tests
22+
run: go test ./... --coverprofile=coverage.txt
23+
24+
- name: Upload results to Codecov
25+
uses: codecov/codecov-action@v3.0.0
26+
with:
27+
files: coverage.txt
28+
token: "${{ secrets.CODECOV_TOKEN }}"

README.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# `cli`
2+
3+
[![Go Reference](https://pkg.go.dev/badge/github.com/broothie/cli.svg)](https://pkg.go.dev/github.com/broothie/cli)
4+
[![Go Report Card](https://goreportcard.com/badge/github.com/broothie/cli)](https://goreportcard.com/report/github.com/broothie/cli)
5+
[![codecov](https://codecov.io/gh/broothie/cli/graph/badge.svg?token=GdWFdveewo)](https://codecov.io/gh/broothie/cli)
6+
[![gosec](https://github.com/broothie/cli/actions/workflows/gosec.yml/badge.svg)](https://github.com/broothie/cli/actions/workflows/gosec.yml)
7+
8+
A Go package for building CLIs.
9+
10+
## Installation
11+
12+
```shell
13+
go get github.com/broothie/cli@latest
14+
```
15+
16+
## Documentation
17+
18+
https://pkg.go.dev/github.com/broothie/cli
19+
20+
## To Do
21+
22+
- [ ] Audit bare `err` returns
23+
- [ ] Two types of errors: config and parse
24+
- [ ] Tab completion
25+
- [ ] Allow variadic arguments
26+
- [ ] Allow slice and map based flags?

readme.md

Lines changed: 0 additions & 21 deletions
This file was deleted.

0 commit comments

Comments
 (0)