Skip to content

split integration test by platform #321

split integration test by platform

split integration test by platform #321

name: integration tests
on:
push:
branches:
- main
pull_request:
branches:
- '*'
workflow_dispatch:
env:
USE_LLM: FALSE
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.10', '3.11', '3.12']
target:
- pennylane
- pennylane-qulacs
- qulacs
include:
- target: pennylane
extras: ''
pytest-marker: 'pennylane'
- target: pennylane-qulacs
extras: '--extras pennylane-qulacs'
pytest-marker: 'pennylane_qulacs'
- target: qulacs
extras: '--extras qulacs'
pytest-marker: 'qulacs'
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install Poetry
run: |
curl -sSL https://install.python-poetry.org | python3 -
echo "${HOME}/.local/bin" >> $GITHUB_PATH
- name: Configure Poetry
run: |
poetry config virtualenvs.create true
poetry config virtualenvs.in-project true
- name: Cache Poetry dependencies
uses: actions/cache@v4
with:
path: ~/.cache/pypoetry
key: poetry-${{ matrix.python-version }}-${{ matrix.target }}-${{ hashFiles('poetry.lock') }}
restore-keys: |
poetry-${{ matrix.python-version }}-${{ matrix.target }}-
poetry-${{ matrix.python-version }}-
- name: Install dependencies from lockfile (no llm)
run: poetry install --with dev ${{ matrix.extras }} --sync
- name: Run tests
run: poetry run pytest tests/integration -m "${{ matrix.pytest-marker }}"