Sync .github/ from v8.1.33
Browse files- .github/workflows/ci.yml +56 -47
.github/workflows/ci.yml
CHANGED
|
@@ -1,47 +1,56 @@
|
|
| 1 |
-
name: CI — Dense Evolution Tests
|
| 2 |
-
|
| 3 |
-
on:
|
| 4 |
-
push:
|
| 5 |
-
branches: [main]
|
| 6 |
-
pull_request:
|
| 7 |
-
branches: [main]
|
| 8 |
-
|
| 9 |
-
jobs:
|
| 10 |
-
test:
|
| 11 |
-
name: Python ${{ matrix.python-version }}
|
| 12 |
-
runs-on: ubuntu-latest
|
| 13 |
-
|
| 14 |
-
strategy:
|
| 15 |
-
fail-fast: false # Impedisce che il fallimento di una versione di Python blocchi le altre
|
| 16 |
-
matrix:
|
| 17 |
-
python-version: ["3.10", "3.11", "3.12"]
|
| 18 |
-
|
| 19 |
-
steps:
|
| 20 |
-
- name: Checkout repository
|
| 21 |
-
uses: actions/checkout@v4
|
| 22 |
-
|
| 23 |
-
- name: Set up Python ${{ matrix.python-version }}
|
| 24 |
-
uses: actions/setup-python@v5
|
| 25 |
-
with:
|
| 26 |
-
python-version: ${{ matrix.python-version }}
|
| 27 |
-
|
| 28 |
-
- name: Install dependencies
|
| 29 |
-
run: |
|
| 30 |
-
python -m pip install --upgrade pip
|
| 31 |
-
pip install pytest numpy scipy pandas matplotlib psutil ipython seaborn plotly
|
| 32 |
-
pip install setuptools pytest numpy scipy pandas matplotlib psutil ipython jax jaxlib seaborn plotly
|
| 33 |
-
pip install qiskit pennylane
|
| 34 |
-
pip install streamlit>=1.30.0
|
| 35 |
-
pip install . --no-deps # Installa il pacchetto locale
|
| 36 |
-
|
| 37 |
-
- name: Run test suite
|
| 38 |
-
run: |
|
| 39 |
-
pytest test_dense_evolution.py test_ia_healing.py test_dashboard_core.py test_ai_middleware.py test_interop.py test_autodiff.py test_quantum_scars.py -v --tb=short
|
| 40 |
-
|
| 41 |
-
|
| 42 |
-
|
| 43 |
-
|
| 44 |
-
|
| 45 |
-
|
| 46 |
-
|
| 47 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
name: CI — Dense Evolution Tests
|
| 2 |
+
|
| 3 |
+
on:
|
| 4 |
+
push:
|
| 5 |
+
branches: [main]
|
| 6 |
+
pull_request:
|
| 7 |
+
branches: [main]
|
| 8 |
+
|
| 9 |
+
jobs:
|
| 10 |
+
test:
|
| 11 |
+
name: Python ${{ matrix.python-version }}
|
| 12 |
+
runs-on: ubuntu-latest
|
| 13 |
+
|
| 14 |
+
strategy:
|
| 15 |
+
fail-fast: false # Impedisce che il fallimento di una versione di Python blocchi le altre
|
| 16 |
+
matrix:
|
| 17 |
+
python-version: ["3.10", "3.11", "3.12"]
|
| 18 |
+
|
| 19 |
+
steps:
|
| 20 |
+
- name: Checkout repository
|
| 21 |
+
uses: actions/checkout@v4
|
| 22 |
+
|
| 23 |
+
- name: Set up Python ${{ matrix.python-version }}
|
| 24 |
+
uses: actions/setup-python@v5
|
| 25 |
+
with:
|
| 26 |
+
python-version: ${{ matrix.python-version }}
|
| 27 |
+
|
| 28 |
+
- name: Install dependencies
|
| 29 |
+
run: |
|
| 30 |
+
python -m pip install --upgrade pip
|
| 31 |
+
pip install pytest numpy scipy pandas matplotlib psutil ipython seaborn plotly
|
| 32 |
+
pip install setuptools pytest numpy scipy pandas matplotlib psutil ipython jax jaxlib seaborn plotly
|
| 33 |
+
pip install qiskit pennylane
|
| 34 |
+
pip install streamlit>=1.30.0 ipywidgets>=8.0.0
|
| 35 |
+
pip install . --no-deps # Installa il pacchetto locale
|
| 36 |
+
|
| 37 |
+
- name: Run test suite
|
| 38 |
+
run: |
|
| 39 |
+
pytest test_dense_evolution.py test_ia_healing.py test_dashboard_core.py test_ai_middleware.py test_interop.py test_autodiff.py test_quantum_scars.py test_mitigation.py test_mps.py test_mitigation_runner.py test_interactive_panel.py -v --tb=short --junitxml=pytest-results.xml
|
| 40 |
+
|
| 41 |
+
- name: Run distributed-chunk tests (simulated multi-device)
|
| 42 |
+
# TestChunkDistributed (issue #1) needs >= 8 JAX devices to exercise
|
| 43 |
+
# anything beyond a skip -- JAX's device count is fixed at process
|
| 44 |
+
# start, so this needs its own pytest invocation with the env var
|
| 45 |
+
# set beforehand, not just a flag inside the test run above.
|
| 46 |
+
env:
|
| 47 |
+
XLA_FLAGS: "--xla_force_host_platform_device_count=8"
|
| 48 |
+
run: |
|
| 49 |
+
pytest test_dense_evolution.py -k TestChunkDistributed -v --tb=short --junitxml=pytest-results-distributed.xml
|
| 50 |
+
|
| 51 |
+
- name: Upload test results on failure
|
| 52 |
+
if: failure()
|
| 53 |
+
uses: actions/upload-artifact@v4
|
| 54 |
+
with:
|
| 55 |
+
name: pytest-results-${{ matrix.python-version }}
|
| 56 |
+
path: pytest-results*.xml
|