Add call tracing module #590
Workflow file for this run
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
# Install scico requirements and run pytest | |
name: unit tests (macos) | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
workflow_dispatch: | |
jobs: | |
test: | |
runs-on: macos-13 | |
strategy: | |
fail-fast: false | |
matrix: | |
group: [1, 2, 3, 4, 5] | |
name: pytest split ${{ matrix.group }} (macos) | |
defaults: | |
run: | |
shell: bash -l {0} | |
steps: | |
# Check-out the repository under $GITHUB_WORKSPACE | |
- uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
# Set up conda environment | |
- name: Set up miniconda | |
uses: conda-incubator/setup-miniconda@v3 | |
with: | |
miniforge-version: latest | |
activate-environment: test-env | |
python-version: "3.12" | |
# Configure conda environment cache | |
- name: Set up conda environment cache | |
uses: actions/cache@v4 | |
with: | |
path: ${{ env.CONDA }}/envs | |
key: conda-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('requirements.txt') }}-${{ hashFiles('dev_requirements.txt') }}-${{ env.CACHE_NUMBER }} | |
env: | |
CACHE_NUMBER: 0 # Increase this value to force cache reset | |
id: cache | |
# Display environment details | |
- name: Display environment details | |
run: | | |
conda info | |
printenv | sort | |
# Install dependencies in conda environment | |
- name: Install dependencies | |
if: steps.cache.outputs.cache-hit != 'true' | |
run: | | |
conda install -c conda-forge pytest pytest-cov | |
python -m pip install --upgrade pip | |
pip install pytest-split | |
pip install -r requirements.txt | |
pip install -r dev_requirements.txt | |
pip install bm3d>=4.0.0 | |
pip install bm4d>=4.0.0 | |
pip install "ray[tune]>=2.5.0" | |
pip install hyperopt | |
conda install -c conda-forge svmbir>=0.4.0 | |
conda install -c astra-toolbox astra-toolbox | |
conda install -c conda-forge pyyaml | |
# Install package to be tested | |
- name: Install package to be tested | |
run: pip install -e . | |
# Run unit tests | |
- name: Run main unit tests | |
run: | | |
DURATIONS_FILE=$(mktemp) | |
bzcat data/pytest/durations_macos.bz2 > $DURATIONS_FILE | |
pytest -x --level=1 --durations-path=$DURATIONS_FILE --splits=5 --group=${{ matrix.group }} --pyargs scico |