-
Notifications
You must be signed in to change notification settings - Fork 191
86 lines (73 loc) · 2.43 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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
name: Performance benchmarks
on:
push:
branches: [main]
paths-ignore: ['docs/**']
# https://docs.github.com/en/actions/using-jobs/using-concurrency
concurrency:
# only cancel in-progress jobs or runs for the current workflow - matches against branch & tags
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
run-and-upload:
# Only run on pushes and when the job is on the main repository and not on forks
if: github.repository == 'aiidateam/aiida-core'
strategy:
fail-fast: false
matrix:
os: [ubuntu-22.04]
postgres: ['12.14']
rabbitmq: ['3.8.14-management']
runs-on: ${{ matrix.os }}
timeout-minutes: 60
services:
postgres:
image: "postgres:${{ matrix.postgres }}"
env:
POSTGRES_DB: test_aiida
POSTGRES_PASSWORD: ''
POSTGRES_HOST_AUTH_METHOD: trust
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
rabbitmq:
image: "rabbitmq:${{ matrix.rabbitmq }}"
ports:
- 5672:5672
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Upgrade pip
run: |
pip install --upgrade pip
pip --version
- name: Install python dependencies
run: |
pip install -r requirements/requirements-py-3.10.txt
pip install --no-deps -e .
pip freeze
- name: Run benchmarks
run: pytest --benchmark-only --benchmark-json benchmark.json
- name: Store benchmark result
uses: aiidateam/github-action-benchmark@v3
with:
benchmark-data-dir-path: "dev/bench/${{ matrix.os }}/psql_dos"
name: "pytest-benchmarks:${{ matrix.os }},psql_dos"
metadata: "postgres:${{ matrix.postgres }}, rabbitmq:${{ matrix.rabbitmq }}"
output-file-path: benchmark.json
render-json-path: .github/workflows/benchmark-config.json
commit-msg-append: "[ci skip]"
github-token: ${{ secrets.GITHUB_TOKEN }}
auto-push: true
# Show alert with commit comment on detecting possible performance regression
alert-threshold: '200%'
comment-on-alert: true
fail-on-alert: false
alert-comment-cc-users: '@chrisjsewell,@giovannipizzi'