-
Notifications
You must be signed in to change notification settings - Fork 79
56 lines (56 loc) · 1.75 KB
/
ci.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
name: ci
on: [push, pull_request]
jobs:
tests:
runs-on: ${{ matrix.os }}
name: test
strategy:
matrix:
os: [ubuntu-20.04, macos-latest] # macos-latest disabled to save quota
python-version: ["3.10"]
fail-fast: false
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: "pip"
- name: install dependencies
run: |
python -m pip install --upgrade pip
pip install --no-cache-dir -r requirements/requirements.txt
pip install --no-cache-dir -r requirements/requirements-extra.txt
pip install --no-cache-dir -r requirements/requirements-dev.txt
pip install --no-cache-dir -r requirements/requirements-types.txt
- name: black linter
run: |
black . --check
- name: mypy checker
run: |
mypy tensorcircuit
- name: pylint checker
run: |
pylint tensorcircuit tests
- name: test scripts
run: |
pytest --cov=tensorcircuit --cov-report=xml -svv --benchmark-skip
- name: Upload coverage to Codecov
if: matrix.os == 'ubuntu-20.04'
uses: codecov/codecov-action@v2
with:
verbose: true
token: ${{ secrets.CODECOV_TOKEN }}
- name: run example demos
run: |
cd examples
python mcnoise_check.py
python vqnhe_h6.py
python mcnoise_boost.py
python quantumng.py
python universal_lr.py
python parameter_shift.py
python mpsvsexact.py
- name: setup build
run: |
python3 setup.py build