-
Notifications
You must be signed in to change notification settings - Fork 658
69 lines (60 loc) · 1.81 KB
/
performance.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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
name: performance
on:
push:
branches: [nightly]
jobs:
performance-benchmarks:
runs-on: ubuntu-latest
env:
BUILD_MODE: release
RUST_BACKTRACE: 1
services:
redis:
image: redis
ports:
- 6379:6379
options: >-
--health-cmd "redis-cli ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
postgres:
image: postgres
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: pass
POSTGRES_DB: nautilus
ports:
- 5432:5432
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Common setup
uses: ./.github/actions/common-setup
with:
python-version: "3.12"
- name: Run pre-commit # Runs again here to check pre-commit with Python 3.12
run: make pre-commit
- name: Install Nautilus CLI and run init postgres
run: |
make install-cli
nautilus database init --schema ${{ github.workspace }}/schema/sql
env:
POSTGRES_HOST: localhost
POSTGRES_PORT: 5432
POSTGRES_USERNAME: postgres
POSTGRES_PASSWORD: pass
POSTGRES_DATABASE: nautilus
- name: Run nautilus_core tests
run: make cargo-test
- name: Build and install wheel
uses: ./.github/actions/common-wheel-build
with:
python-version: ${{ matrix.python-version }}
# Run codspeed once only
- name: Run benchmarks
uses: CodSpeedHQ/[email protected]
with:
token: ${{ secrets.CODSPEED_TOKEN }}
run: pytest tests/performance_tests --benchmark-disable-gc --codspeed