Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions .github/workflows/doc_checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,22 @@ name: Documentation check
on:
- pull_request

permissions:
contents: read

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
doc_checks:
runs-on: ubuntu-latest
env:
QISKIT_SETTINGS: ${{github.workspace}}/docs/qiskit_settings.conf

steps:
- name: Cancel Workflow Action
uses: styfle/cancel-workflow-action@0.11.0

- uses: actions/checkout@v4
- uses: actions/checkout@v5

- uses: sQUlearn/sphinx-action@master
with:
Expand Down
202 changes: 202 additions & 0 deletions .github/workflows/elaborate_tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,202 @@
name: Elaborate Tests
on:
pull_request:
types: [review_requested]
schedule:
- cron: '23 1 * * *'

permissions:
contents: read

concurrency:
group: ${{ github.workflow }}-${
(github.event_name == 'pull_request' && github.event.pull_request.number || github.ref_name)
}
cancel-in-progress: true

jobs:
pytest_minimal_requirements:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v5
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: '3.9'
- name: Install dependencies
run: |
python -m venv venv_minimal
source venv_minimal/bin/activate
python -m pip install --upgrade pip
pip install toml autoray==0.7.2 matplotlib-inline==0.1.7
python3 install_lowest_dependencies.py
- name: Test with pytest
run: |
source venv_minimal/bin/activate
pip install pytest
pytest tests/
- name: clean
run: |
rm -rf venv_minimal

pytest_qiskit_0_46:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v5
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: '3.9'
- name: Install dependencies
run: |
python -m venv venv_qiskit_0_46
source venv_qiskit_0_46/bin/activate
python -m pip install --upgrade pip
pip install . qiskit==0.46.3 qiskit-ibm-runtime==0.20.0 autoray==0.7.2
- name: Test with pytest
run: |
source venv_qiskit_0_46/bin/activate
pip install pytest
pytest tests/
- name: clean
run: |
rm -rf venv_qiskit_0_46

pytest_qiskit_1:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v5
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: '3.9'
- name: Install dependencies
run: |
python -m venv venv_qiskit_1
source venv_qiskit_1/bin/activate
python -m pip install --upgrade pip
pip install . qiskit==1.1.2 qiskit-algorithms==0.3.0 qiskit-ibm-runtime==0.27.1 autoray==0.7.2
- name: Test with pytest
run: |
source venv_qiskit_1/bin/activate
pip install pytest
pytest tests/
- name: clean
run: |
rm -rf venv_qiskit_1

pytest_full:
name: Tests + Examples on ubuntu-latest with Python ${{ matrix.python-version }}
runs-on: ubuntu-latest

strategy:
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]

steps:
- uses: actions/checkout@v5
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: |
${{
matrix.python-version
}}
- name: Install dependencies
run: |
python -m venv venv_latest
source venv_latest/bin/activate
python -m pip install --upgrade pip
pip install .[examples]
- name: Install old autoray
if: matrix.python-version == '3.9'
run: |
source venv_latest/bin/activate
pip install autoray==0.7.2
- name: Test with pytest
run: |
source venv_latest/bin/activate
pip install pytest
pytest tests/
- name: Test examples
run: |
source venv_latest/bin/activate
pip install nbmake
pytest --nbmake --nbmake-timeout 600 examples/
- name: clean
run: |
rm -rf venv_latest

pytest_windows:
name: Test on windows-latest with Python ${{ matrix.python-version }}
runs-on: windows-latest

strategy:
matrix:
python-version: ["3.9", "3.12"]

steps:
- uses: actions/checkout@v5
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: |
${{
matrix.python-version
}}
- name: Install dependencies
run: |
python -m venv venv_latest
.\venv_latest\Scripts\python.exe -m pip install --upgrade pip
.\venv_latest\Scripts\pip.exe install .
- name: Install old autoray
if: matrix.python-version == '3.9'
run: |
.\venv_latest\Scripts\pip.exe install autoray==0.7.2
- name: Test with pytest
run: |
.\venv_latest\Scripts\pip.exe install pytest
.\venv_latest\Scripts\pytest.exe tests/
- name: clean
run: |
rm -Recurse -Force venv_latest

pytest_macos:
name: Test on macos-latest with Python ${{ matrix.python-version }}
runs-on: macos-latest

strategy:
matrix:
python-version: ["3.9", "3.12"]

steps:
- uses: actions/checkout@v5
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: |
${{
matrix.python-version
}}
- name: Install dependencies
run: |
python -m venv venv_latest
source venv_latest/bin/activate
python -m pip install --upgrade pip
pip install .
- name: Install old autoray
if: matrix.python-version == '3.9'
run: |
source venv_latest/bin/activate
pip install autoray==0.7.2
- name: Test with pytest
run: |
source venv_latest/bin/activate
pip install pytest
pytest tests/
- name: clean
run: |
rm -rf venv_latest
16 changes: 10 additions & 6 deletions .github/workflows/format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,27 @@ name: Formatting check
on:
- pull_request

permissions:
contents: read

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
black:
runs-on: ubuntu-latest

steps:
- name: Cancel Workflow Action
uses: styfle/cancel-workflow-action@0.11.0

- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v6
with:
python-version: 3.9
python-version: 3.13

- name: Install dependencies
run: pip install black[jupyter]

- uses: actions/checkout@v4
- uses: actions/checkout@v5

- name: Run Black
run: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@ jobs:
id-token: write
steps:
- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v6
with:
python-version: 3.9

- name: Install dependencies
run: pip install flit

- uses: actions/checkout@v4
- uses: actions/checkout@v5

- name: Build
run: flit build
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/publish_docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ jobs:
QISKIT_SETTINGS: ${{github.workspace}}/docs/qiskit_settings.conf
steps:
- name: Checkout Source Code
uses: actions/checkout@v4
uses: actions/checkout@v5
- name: Checkout GH Pages
uses: actions/checkout@v4
uses: actions/checkout@v5
with:
repository: sQUlearn/squlearn.github.io
fetch-depth: 0
Expand Down
50 changes: 50 additions & 0 deletions .github/workflows/quick_tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Quick Tests
on:
pull_request:

permissions:
contents: read

concurrency:
group: ${{ github.workflow }}-${
(github.event_name == 'pull_request' && github.event.pull_request.number || github.ref_name)
}
cancel-in-progress: true

jobs:
pytest:
name: Tests on ubuntu-latest with Python ${{ matrix.python-version }}
runs-on: ubuntu-latest

strategy:
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]

steps:
- uses: actions/checkout@v5
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: |
${{
matrix.python-version
}}
- name: Install dependencies
run: |
python -m venv venv_latest
source venv_latest/bin/activate
python -m pip install --upgrade pip
pip install .
- name: Install old autoray
if: matrix.python-version == '3.9'
run: |
source venv_latest/bin/activate
pip install autoray==0.7.2
- name: Test with pytest
run: |
source venv_latest/bin/activate
pip install pytest
pytest tests/
- name: clean
run: |
rm -rf venv_latest
20 changes: 20 additions & 0 deletions .github/workflows/stale.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: 'Close stale issues and PRs'
on:
schedule:
- cron: '30 1 * * *'

jobs:
stale:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v10
with:
stale-issue-message: 'This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 1 year.'
stale-pr-message: 'This PR is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 1 year.'
close-issue-message: 'This issue was closed because it has been stalled for 1 year with no activity.'
close-pr-message: 'This PR was closed because it has been stalled for 1 year with no activity.'
days-before-stale: 30
days-before-close: 365
exempt-issue-labels: 'bug,eternal'
exempt-all-issue-milestones: 'true'
exempt-all-issue-assignees: 'true'
Loading