Skip to content

Add Composition.set_random() (#728) #2253

Add Composition.set_random() (#728)

Add Composition.set_random() (#728) #2253

Workflow file for this run

name: pytest-all
on:
# Trigger the workflow on push or pull request,
# but only for the main branch
push:
branches:
- main
pull_request:
branches:
- main
- development
workflow_dispatch:
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v4
- name: Install Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: "pip"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Install pynucastro
run: pip install --editable .
- name: Print system info
run: |
pip install threadpoolctl &>/dev/null
python -c "import sys, numpy; print(numpy.__version__); print(sys.version); print(numpy.show_runtime())"
echo
lscpu
- name: Run tests with pytest
run: pytest -v -s --nbval --cov=pynucastro --color=yes
- name: Upload output from failed write_network tests
uses: actions/upload-artifact@v4
if: failure()
with:
name: failed_networks_${{ matrix.python-version }}
path: _test_*/
if-no-files-found: ignore
retention-days: 5