From 2be98ae3f69ad8775a018a5a2d16efb090fac342 Mon Sep 17 00:00:00 2001 From: Simon Nilsson Date: Mon, 28 Aug 2023 18:39:29 +0200 Subject: [PATCH] Add ci workflow with coverage report --- .github/workflows/ci.yml | 30 ++++++++++++++++++++++++++++++ README.md | 5 ++--- 2 files changed, 32 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..e53f830 --- /dev/null +++ b/.github/workflows/ci.yml @@ -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' \ No newline at end of file diff --git a/README.md b/README.md index aedd67f..49de791 100644 --- a/README.md +++ b/README.md @@ -3,14 +3,13 @@
PkgGoDev Go Report Card -GoCover.io +Go Coverage Mentioned in Awesome Go
and you shall receive.

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. - - +

: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