-
Notifications
You must be signed in to change notification settings - Fork 0
63 lines (52 loc) · 1.76 KB
/
build.yml
File metadata and controls
63 lines (52 loc) · 1.76 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
name: Benchmark JSONPath
on:
pull_request:
paths:
- 'go.mod'
- 'go.sum'
- '**.go'
- '.github/workflows/*.yml'
jobs:
build:
permissions: write-all
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.ref }}
- name: Install requirements
run: pip install jinjanator tabulate pygal
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version-file: 'go.mod'
- name: Build
run: go build -v ./...
- name: Benchmark `$.store.book[0].price`
run: |
go test -benchmem -bench Benchmark1 | tee benchmark_threeLevelsWithIndex_test.result.txt
- name: Benchmark `$..book[?(@.price > $.store.bicycle.price)]`
run: |
go test -benchmem -bench Benchmark2 | tee benchmark_recursiveDescentWithFilter_test.result.txt
- name: Build visual summaries
run: python3 scripts/parse_bench.py
- name: Print generated tables to log
run: |
echo '--- Libraries ---'
cat assets/libraries.md || true
echo
echo '--- Bench table (Simple) ---'
cat assets/bench_table_simple.md || true
echo
echo '--- Bench table (Complex) ---'
cat assets/bench_table_complex.md || true
echo
echo '--- Capability matrix ---'
cat assets/support_matrix.md || true
- name: Update README
run: jinjanate --output-file README.md assets/README.t
- name: Commit changes
uses: EndBug/add-and-commit@v9
with:
add: 'README.md assets/bench_chart_simple.svg assets/bench_chart_complex.svg'
message: 'update README for ${{ github.sha }}'