-
-
Notifications
You must be signed in to change notification settings - Fork 21
48 lines (42 loc) · 1.3 KB
/
ci-profile.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
name: ci-profiling
# Bump 3
on: push
jobs:
test-profile:
name: Profile ada-py-full
if: ${{ contains(github.event.head_commit.message, '[profile]') }}
runs-on: ubuntu-latest
defaults:
run:
shell: bash -l {0}
steps:
- uses: actions/checkout@v3
- uses: mamba-org/setup-micromamba@v1 # https://github.com/mamba-org/setup-micromamba
with:
cache-env: true
environment-name: ada
channels: conda-forge
channel-priority: strict
environment-file: conda/environment.core.yml
create-args: >-
python=3.11
jupyterlab
pythreejs
pyparsing
pytest
scalene
- name: pip install
run: |
pip install -e .
- name: Profile using scalene
run: scalene --json -m pytest ./tests --ignore=./tests/docker/ --outfile=profile.json
- name: Profile using cProfile
run: python -m cProfile -o profile -m pytest tests --ignore=./tests/docker
- name: Create Release Package
uses: softprops/action-gh-release@v1
with:
files: |
profile.json
profile
tag_name: "Ada-py profile $(date +'%Y-%m-%d %H:%M')"
body: "Profile produced on commit ${{ github.sha }}"