Skip to content

Commit 70327c5

Browse files
committed
fix test
1 parent b398eaf commit 70327c5

File tree

2 files changed

+62
-0
lines changed

2 files changed

+62
-0
lines changed

.github/workflows/pytest-all.yml~

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
name: pytest-all
2+
3+
on:
4+
# Trigger the workflow on push or pull request,
5+
# but only for the main branch
6+
push:
7+
branches:
8+
- main
9+
pull_request:
10+
branches:
11+
- main
12+
workflow_dispatch:
13+
14+
jobs:
15+
test:
16+
runs-on: ubuntu-latest
17+
18+
strategy:
19+
matrix:
20+
python-version: ["3.10", "3.11", "3.12", "3.13"]
21+
22+
steps:
23+
- uses: actions/checkout@v4
24+
25+
- name: Install Python ${{ matrix.python-version }}
26+
uses: actions/setup-python@v5
27+
with:
28+
python-version: ${{ matrix.python-version }}
29+
cache: "pip"
30+
31+
- name: Install dependencies
32+
run: |
33+
python -m pip install --upgrade pip
34+
pip install -r requirements.txt
35+
36+
- name: Install pynucastro
37+
run: pip install --editable .
38+
39+
- name: Print system info
40+
run: |
41+
echo '::group::NumPy'
42+
pip install threadpoolctl &>/dev/null
43+
python -c "import sys, numpy; print(numpy.__version__); print(sys.version); print(numpy.show_runtime())"
44+
echo '::endgroup::'
45+
echo '::group::CPU info'
46+
lscpu
47+
echo '::endgroup::'
48+
echo '::group::Package versions'
49+
pip list --format=freeze
50+
echo '::endgroup::'
51+
52+
- name: Run tests with pytest
53+
run: pytest -v -s --nbval --cov=pynucastro --color=yes
54+
55+
- name: Upload output from failed write_network tests
56+
uses: actions/upload-artifact@v4
57+
if: failure()
58+
with:
59+
name: failed_networks_${{ matrix.python-version }}
60+
path: _test_*/
61+
if-no-files-found: ignore
62+
retention-days: 5

0 commit comments

Comments
 (0)