Skip to content

Commit 3f1f3bd

Browse files
committed
feat: auto-generate graphs
1 parent 82862b8 commit 3f1f3bd

File tree

5 files changed

+12
-10
lines changed

5 files changed

+12
-10
lines changed

.github/workflows/nodejs.yml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,16 @@ jobs:
2323
run: |
2424
npm install
2525
npm test
26-
npm start
26+
npm -s start > results/benchmarks-${{ matrix.node-version }}.csv
27+
cp results/benchmarks-${{ matrix.node-version }}.csv benchmarks.csv
28+
npm -s run graph > results/bar-graph-${{ matrix.node-version }}.svg
29+
rm benchmarks.csv
2730
env:
2831
CI: true
32+
- name: push
33+
uses: github-actions-x/commit@v2
34+
with:
35+
github-token: ${{ secrets.GITHUB_TOKEN }}
36+
push-branch: master
37+
commit-message: 'feat: ${{ matrix.node-version }} adds auto-generated benchmarks and bar graph'
38+
force-add: 'true'

bar-graph.svg

Lines changed: 0 additions & 1 deletion
This file was deleted.

benchmarks.csv

Lines changed: 0 additions & 6 deletions
This file was deleted.

index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ suite
5656
columns: ['name', 'hz']
5757
})
5858

59-
writeFileSync('./benchmarks.csv', csv, { encoding: 'utf8' })
59+
process.stdout.write(csv)
6060
})
6161
.run({
6262
async: true

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
"scripts": {
66
"start": "ts-node index.ts",
77
"graph": "vl2vg vega-lite-bar-chart.json | vg2svg",
8-
"poststart": "npm run graph",
98
"test": "jest"
109
},
1110
"keywords": [],

0 commit comments

Comments
 (0)