Added features for Scalene VS Code extension support (#692) #1234
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
# Note: This test doesn't need to read an output, | |
# it is meant to determine if there is an ImportError | |
# or anything related if relative imports are used. | |
- name: -m invocation smoketest | |
run: | | |
python -m pip install git+https://github.com/sternj/import_stress_test | |
python -m scalene --cli --- -m import_stress_test |