diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 4d079539c..b291a4cc2 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -69,6 +69,7 @@ jobs: MKL_NUM_THREADS: 1 PYTHONHASHSEED: 0 NUTILS_TENSORIAL: ${{ matrix.tensorial }} + COVERAGE_CORE: sysmon steps: - name: Checkout uses: actions/checkout@v4 @@ -104,7 +105,15 @@ jobs: python -um pip install --upgrade --upgrade-strategy eager mkl python -um devtools.gha.configure_mkl - name: Test - run: python -um coverage run -m unittest discover -b -q -t . -s tests + run: python -u -m cProfile -o stats -m coverage run -m unittest -b -v tests.test_solver.finitestrain:vector=False.test_minimize_cache + - name: Print profile + shell: python + run: | + import pstats + stats = pstats.Stats('stats').sort_stats('cumulative') + stats.print_stats(200) + stats.print_callers('builtins.next') + stats.print_callees('builtins.next') - name: Post-process coverage run: python -um devtools.gha.coverage_report_xml - name: Upload coverage @@ -146,7 +155,7 @@ jobs: # Install Nutils from `dist` dir created in job `build-python-package`. python -um pip install "$_wheel[matrix_scipy,export_mpl]" - name: Test - run: python -um unittest discover -b -q -t . -s examples + run: python -um unittest discover -b -v -t . -s examples test-sphinx: name: Test building docs runs-on: ubuntu-latest