diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index cb81a0c..9161025 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -21,10 +21,19 @@ jobs: - name: unit-tests run: | - go test ./... -coverprofile=coverage.out - cat coverage.out | grep -v "query/parser.gen.go" | grep -v "query/ast.go:81" > coverage_filtered.out + go test ./... -coverprofile=$GITHUB_WORKSPACE/coverage.out + cat $GITHUB_WORKSPACE/coverage.out | grep -v "query/parser.gen.go" | grep -v "query/ast.go:81" > $GITHUB_WORKSPACE/coverage_filtered.out go tool cover -func=coverage_filtered.out + - name: install-goveralls + run: | + go install github.com/mattn/goveralls@latest + + - name: submit-coverage + run: $(go env GOPATH)/bin/goveralls -service="github" -coverprofile=$GITHUB_WORKSPACE/coverage_filtered.out + env: + COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: golangci-lint uses: golangci/golangci-lint-action@v6 with: diff --git a/README.md b/README.md index af3ac96..1541f50 100644 --- a/README.md +++ b/README.md @@ -1,27 +1,7 @@ -# dumbql +# dumbql ![GitHub go.mod Go version](https://img.shields.io/github/go-mod/go-version/defer-panic/dumbql) ![GitHub License](https://img.shields.io/github/license/defer-panic/dumbql) ![GitHub Tag](https://img.shields.io/github/v/tag/defer-panic/dumbql) [![Go Report Card](https://goreportcard.com/badge/github.com/defer-panic/dumbql)](https://goreportcard.com/report/github.com/defer-panic/dumbql) [![CI](https://github.com/defer-panic/dumbql/actions/workflows/main.yml/badge.svg)](https://github.com/defer-panic/dumbql/actions/workflows/main.yml) [![Coverage Status](https://coveralls.io/repos/github/defer-panic/dumbql/badge.svg?branch=main)](https://coveralls.io/github/defer-panic/dumbql?branch=main) [![Go Reference](https://pkg.go.dev/badge/github.com/defer-panic/dumbql.svg)](https://pkg.go.dev/github.com/defer-panic/dumbql) Simple (dumb) query language and parser for Go. -## Table of Contents - - -* [dumbql](#dumbql) - * [Table of Contents](#table-of-contents) - * [Features](#features) - * [Examples](#examples) - * [Simple parse](#simple-parse) - * [Validation against schema](#validation-against-schema) - * [Convert to SQL](#convert-to-sql) - * [Match against structs](#match-against-structs) - * [Query syntax](#query-syntax) - * [Field expression](#field-expression) - * [Field expression operators](#field-expression-operators) - * [Boolean operators](#boolean-operators) - * [“One of” expression](#one-of-expression) - * [Numbers](#numbers) - * [Strings](#strings) - - ## Features - Field expressions (`age >= 18`, `field.name:"field value"`, etc.)