-
Notifications
You must be signed in to change notification settings - Fork 40
60 lines (51 loc) · 1.58 KB
/
tests_without_binary.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
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 }}