Skip to content

Refactor setup.py to align with CF. #2909

Refactor setup.py to align with CF.

Refactor setup.py to align with CF. #2909

name: Testing without binary
on:
push:
branches:
- master
pull_request:
env:
COVERAGE_FLAGS: "--cov=pennylane_lightning --cov-report=term-missing --cov-report=xml:./coverage.xml --no-flaky-report -p no:warnings --tb=native"
jobs:
pythontests:
name: Python tests
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-22.04]
steps:
- name: Cancel previous runs
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}
- name: Checkout PennyLane-Lightning
uses: actions/checkout@v3
with:
path: main
- uses: actions/setup-python@v4
name: Install Python
with:
python-version: '3.8'
- name: Get required Python packages
run: |
cd main
python -m pip install --upgrade pip
pip install -r requirements-dev.txt
- name: Install lightning.qubit device
run: |
cd main
pip install -e .
env:
SKIP_COMPILATION: True
- name: Run PennyLane-Lightning unit tests
run: |
cd main/
pytest tests/ $COVERAGE_FLAGS
pl-device-test --device lightning.qubit --skip-ops --shots=20000 $COVERAGE_FLAGS --cov-append
pl-device-test --device lightning.qubit --shots=None --skip-ops $COVERAGE_FLAGS --cov-append
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
files: ./main/coverage.xml
fail_ci_if_error: true
token: ${{ secrets.CODECOV_TOKEN }}