-
Notifications
You must be signed in to change notification settings - Fork 30
executable file
·112 lines (94 loc) · 3.29 KB
/
continuous_integration.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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
name: Continuous Integration
on: [pull_request]
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install pip, wheel, pytest, jupyter, pyqsp
run: |
python -m pip install --upgrade pip
pip install wheel
pip install pytest
pip install pytest-cov
pip install jupyter
pip install pyqsp
- name: Install pycodestyle
run: |
python -m pip install pycodestyle
- name: pycodestyle tests
run: |
cd dev_tools
pytest --doctest-modules --junitxml=junit/pycodestyle-test-results.xml test_conformance.py
if: always()
- name: Install backends except qsharp/qdk
run: |
pip install qiskit qiskit-aer
pip install qulacs
pip install amazon-braket-sdk
pip install cirq
pip install projectq
pip install pennylane
pip install stim
if: always()
- name: Install Microsoft qsharp/qdk
run: |
wget https://packages.microsoft.com/config/ubuntu/20.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb
sudo dpkg -i packages-microsoft-prod.deb
rm packages-microsoft-prod.deb
sudo apt-get update; sudo apt-get install -y apt-transport-https && sudo apt-get update
sudo apt-get install -y dotnet-sdk-5.0
dotnet tool install -g Microsoft.Quantum.IQSharp
$(which dotnet-iqsharp) install --user
pip install qsharp
if: always()
- name: tangelo install
run: |
python -m pip install .
if: always()
- name: tangelo no_pyscf tests
run: |
cd tangelo/toolboxes/molecular_computation/tests
pytest --doctest-modules --junitxml=junit/nopyscf-test-results_${{ matrix.python-version }}.xml test_nopyscf.py
if: always()
- name: Install pyscf
run: |
python -m pip install pyscf
if: always()
- name: Install rdkit, openbabel-wheel
run: |
python -m pip install rdkit
python -m pip install openbabel-wheel
if: always()
- name: tangelo tests
run: |
cd tangelo
pytest --doctest-modules --junitxml=junit/tangelo-test-results_${{ matrix.python-version }}.xml --cov=. --cov-report=xml --cov-report=html
if: always()
- name: Upload nopyscf test results
uses: actions/upload-artifact@v3
with:
name: tangelo-no-pyscf-test-results
path: tangelo/toolboxes/molecular_computation/tests/junit/nopyscf-test-results_${{ matrix.python-version }}.xml
- name: Upload pytest test results
uses: actions/upload-artifact@v3
with:
name: tangelo-test-results
path: tangelo/junit/tangelo-test-results_${{ matrix.python-version }}.xml
- name: Upload pytest html results
uses: actions/upload-artifact@v3
with:
name: tangelo-tests-coverage_${{ matrix.python-version }}
path: tangelo/htmlcov
if: always()
- name: Download all workflow run artifacts
uses: actions/download-artifact@v3
if: always()