-
Notifications
You must be signed in to change notification settings - Fork 71
55 lines (44 loc) · 1.39 KB
/
test.yml
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
name: Node CI
on: [push, pull_request]
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
node-version: [18.x, 20.x, 22.x]
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- name: npm install, test
run: |
yarn
yarn test
- name: type check
run: |
npm i -g typescript
yarn build-types
[ $(git diff types.d.ts | wc -l) -gt 0 ] && echo 'Diff exists in types.d.ts. Please change jsdoc.' && exit 1
tsc --noEmit types.d.ts
- name: install valgrind
run: sudo apt-get install -y valgrind
- name: benchmark
run: python cachegrind.py node test/benchmark2.js > output.txt
- name: Download previous benchmark result
uses: actions/cache@v1
with:
path: ./cache
key: ${{ runner.os }}-${{matrix.node-version}}-benchmark
- name: Store benchmark result
uses: benchmark-action/github-action-benchmark@v1
with:
tool: "customSmallerIsBetter"
output-file-path: output.txt
external-data-json-path: ./cache/benchmark-data.json
alert-threshold: "105%"
fail-on-alert: true
env:
CI: true