-
Notifications
You must be signed in to change notification settings - Fork 5
53 lines (53 loc) · 1.73 KB
/
benchmark.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
name: Benchmark
on:
push: {}
workflow_call: {}
jobs:
build:
runs-on: ubuntu-latest
services:
mongodb:
image: mongo:5
env:
"MONGO_INITDB_ROOT_USERNAME": "root"
"MONGO_INITDB_ROOT_PASSWORD": "password"
ports:
- 27017:27017
postgres:
image: postgres:14-alpine
env:
"POSTGRES_PASSWORD": "password"
"POSTGRES_USER": "root"
"POSTGRES_DB": "main_db"
ports:
- "27016:5432"
timeout-minutes: 10
strategy:
matrix:
node-version: [18.x]
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- name: Install K6
uses: grafana/setup-k6-action@v1
- name: Install wrk
run: |
sudo apt-get update
sudo apt-get install -y wrk
- run: make install
- run: make build
- name: Run NoSQL Injection Benchmark
run: cd benchmarks/nosql-injection && AIKIDO_CI=true node --preserve-symlinks benchmark.js
- name: Run SQL Injection Benchmark
run: cd benchmarks/sql-injection && node --preserve-symlinks benchmark.js
- name: Run shell injection Benchmark
run: cd benchmarks/shell-injection && node --preserve-symlinks benchmark.js
- name: Run Hono with Postgres Benchmark
run: cd benchmarks/hono-pg && node --preserve-symlinks benchmark.js
- name: Run API Discovery Benchmark
run: cd benchmarks/api-discovery && node --preserve-symlinks benchmark.js
- name: Run Express Benchmark
run: cd benchmarks/express && node --preserve-symlinks benchmark.js