Skip to content

Commit f0959ac

Browse files
committed
add readme
1 parent ea217c1 commit f0959ac

File tree

2 files changed

+37
-23
lines changed

2 files changed

+37
-23
lines changed

.github/workflows/go.yml

Lines changed: 18 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,32 @@
1-
name: Go Test Report
1+
name: Go Test
22

33
on: [push, pull_request]
44

55
permissions:
6-
contents: read
7-
checks: write
8-
id-token: write
6+
contents: write
7+
checks: write
8+
id-token: write
99

1010
jobs:
1111
test:
1212
runs-on: ubuntu-latest
13-
1413
steps:
1514
- uses: actions/checkout@v4
1615
- uses: actions/setup-go@v5
1716
with:
1817
go-version: 1.24
19-
20-
- name: Install gotestsum
21-
run: go install gotest.tools/gotestsum@latest
22-
23-
- name: Run tests and generate report
24-
run: |
25-
mkdir -p test-report
26-
$(go env GOPATH)/bin/gotestsum --junitfile test-report/report.xml --format standard-verbose ./...
27-
28-
- name: Upload test report
29-
uses: actions/upload-artifact@v4
30-
with:
31-
name: go-test-report
32-
path: test-report/report.xml
33-
34-
- name: Publish Test Results to GitHub UI
35-
uses: mikepenz/action-junit-report@v4
18+
- uses: actions/setup-go@v3
19+
- name: go test
20+
run: go test ./... -coverprofile=./cover.out -covermode=atomic -coverpkg=./...
21+
- name: check test coverage
22+
uses: vladopajic/go-test-coverage@v2
3623
with:
37-
report_paths: 'test-report/*.xml'
24+
profile: cover.out
25+
threshold-total: 95
26+
27+
## when token is not specified (value '') this feature is turned off
28+
## in this example badge is created and committed only for main branch
29+
git-token: ${{ github.ref_name == 'main' && secrets.GITHUB_TOKEN || '' }}
30+
## name of branch where badges are stored
31+
## ideally this should be orphan branch (see below how to create this branch)
32+
git-branch: badges

README.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<center>
2+
<h1>excel-formula-parser</h1>
3+
<i>A parser for excel-formula written in pure Go</i>
4+
<p>
5+
<img src="https://goreportcard.com/badge/github.com/link-duan/excel-formula-parser"/>
6+
<img src="https://github.com/link-duan/excel-formula-parser/actions/workflows/go.yml/badge.svg"/>
7+
</p>
8+
</center>
9+
10+
## Supportted syntax
11+
- [x] Math operations (eg. `+ - * / ^ %`)
12+
- [x] Cell references ( Absolute & Relative. eg. `$A$1` `A1:B2` )
13+
- [x] Function call
14+
15+
## Usage
16+
```go
17+
ast, _ := excelformulaparser.NewParser("=SUM(A1:B2, C$3, 4:4)").Parse()
18+
fmt.Printf("%v", ast)
19+
```

0 commit comments

Comments
 (0)