Skip to content

Commit

Permalink
Add ci workflow with coverage report
Browse files Browse the repository at this point in the history
  • Loading branch information
simonnilsson committed Aug 28, 2023
1 parent 26da40c commit 2be98ae
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 3 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: ci

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch:

jobs:

test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: 'stable'

- name: Build
run: go build -v ./...

- name: Test
run: go test -v ./...

- name: Update coverage badge
uses: ncruces/go-coverage-report@v0
if: github.event_name == 'push'
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,13 @@
<br/>
<a href="https://pkg.go.dev/github.com/simonnilsson/ask"><img src="https://pkg.go.dev/badge/github.com/simonnilsson/ask" alt="PkgGoDev" /></a>
<a href="https://goreportcard.com/report/github.com/simonnilsson/ask"><img src="https://goreportcard.com/badge/github.com/simonnilsson/ask" alt="Go Report Card" /></a>
<a href="https://gocover.io/github.com/simonnilsson/ask"><img src="http://gocover.io/_badge/github.com/simonnilsson/ask" alt="GoCover.io" /></a>
<a href="https://raw.githack.com/wiki/simonnilsson/ask/coverage.html"><img src="https://github.com/simonnilsson/ask/wiki/coverage.svg" alt="Go Coverage" /></a>
<a href="https://github.com/avelino/awesome-go#json"><img src="https://awesome.re/mentioned-badge.svg" alt="Mentioned in Awesome Go" /></a>
<br/>
and you shall receive.
</p>
Ask provides a simple way of accessing nested properties in maps and slices. Works great in combination with encoding/json and other packages that "Unmarshal" arbitrary data into Go data-types. Inspired by the get function in the lodash javascript library.


<br/><br/>
:warning: From version `v0.3.0`, the package requires [Go 1.17+](https://golang.org/doc/install), due to the usage of new additions to the reflect package.

## Use
Expand Down

0 comments on commit 2be98ae

Please sign in to comment.