-
Notifications
You must be signed in to change notification settings - Fork 2
62 lines (58 loc) · 1.72 KB
/
main.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
name: Continuous Integration
on:
pull_request:
branches:
- main
workflow_dispatch:
schedule:
- cron: '0 0 * * *'
jobs:
run_tests:
runs-on: ubuntu-latest
if: github.event_name == 'pull_request' || startsWith(github.ref, 'refs/tags/')
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.11.3
- name: Cache pip
uses: actions/cache@v2
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install dependencies
run: pip install tox==4.16.0
- name: Check Python packages
run: python -m pip check
- name: Run tests
run: tox -e test
run_benchmark:
runs-on: ubuntu-latest
if: github.event_name == 'workflow_dispatch' || github.event_name == 'schedule'
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.11.3
- name: Cache pip
uses: actions/cache@v2
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install dependencies
run: pip install tox==4.16.0
- name: Run benchmark
run: tox -e benchmark -- --backend=${BACKEND}
env:
BACKEND: ${{ github.event.inputs.backend || 'iqmfakeadonis' }}
- name: Upload benchmark results
uses: actions/upload-artifact@v2
with:
name: benchmark-results
path: Outputs