Skip to content

Updates to properly handle @profile decorators for CPU time attribution #1108

Updates to properly handle @profile decorators for CPU time attribution

Updates to properly handle @profile decorators for CPU time attribution #1108

name: smoketests
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
workflow_dispatch: # manual execution
jobs:
smoketests:
runs-on: ${{ matrix.os }}
timeout-minutes: 15 # on macos-latest, pypy-3.7 it builds numpy and others
strategy:
matrix:
os: [ ubuntu-latest, macos-latest ] # disabling windows-latest for now
python: [ '3.9', '3.10', '3.11' ] # temporarily disabling pypy-3.7 (eventually add 3.12)
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python }}
- name: Work around arm64 support on MacOS
# https://github.com/actions/virtual-environments/issues/2557
if: matrix.os == 'macos-latest'
run: sudo rm -Rf /Library/Developer/CommandLineTools/SDKs/*
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -r requirements.txt
python -m pip install numpy
- name: Build scalene
run: pip -v install -e .
- name: cpu-only smoke test
run: python test/smoketest.py test/testme.py --cpu-only
- name: multiprocessing smoke test
run: python test/smoketest.py test/multiprocessing_test.py
# Note: test/smoketest.py only handles single JSON, rather than multiple in sequence.
- name: profile-interval smoke test
run: python -m scalene --cli --profile-interval=2 test/testme.py
- name: decorator smoke test
run: python test/smoketest_profile_decorator.py