forked from Qiskit/qiskit-metapackage
-
Notifications
You must be signed in to change notification settings - Fork 0
101 lines (101 loc) · 2.96 KB
/
main.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
name: Tests
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
tests:
name: tests-python${{ matrix.python-version }}-${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: [3.7, 3.8, 3.9, "3.10"]
os: ["ubuntu-latest"]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install Deps
run: python -m pip install -U tox setuptools virtualenv wheel pip
- name: Install and Run Tests
run: tox -e py
lint:
name: lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.7
uses: actions/setup-python@v2
with:
python-version: 3.7
- name: Install Deps
run: python -m pip install -U tox
- name: Run lint
run: tox -elint
docs:
name: docs
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set up Python 3.7
uses: actions/setup-python@v2
with:
python-version: 3.7
- name: Install ubuntu Deps
run: sudo apt-get install -y pandoc graphviz
- name: Install python Deps
run: |
python -m pip install -U tox
python -m pip install -r requirements-dev.txt
- name: Build Docs
run: tox -edocs -- -j auto
- name: Compress Artifacts
run: |
mkdir artifacts
tar -zcvf html_docs.tar.gz docs/_build/html
mv html_docs.tar.gz artifacts/.
- uses: actions/upload-artifact@v2
with:
name: html_docs
path: artifacts
tutorials:
name: tutorials
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set up Python 3.7
uses: actions/setup-python@v2
with:
python-version: 3.7
- name: Install python Deps
run: python -m pip install -U tox
- name: Setup tutorials
run: |
set -e
git clone https://github.com/Qiskit/qiskit-tutorials
pip install -c constraints.txt -U jupyter sphinx nbsphinx networkx sphinx_rtd_theme 'matplotlib>=3.3.0' qiskit-terra[visualization] cvxpy 'pyscf<1.7.4' scikit-learn
pip install -c constraints.txt -U .
sudo apt-get install -y pandoc graphviz
- name: Run tutorials
run: |
set -e
cd qiskit-tutorials
sphinx-build -b html . _build/html
env:
QISKIT_CELL_TIMEOUT: 300
- name: Compress Artifacts
run: |
mkdir artifacts
tar -zcvf tutorial_docs.tar.gz qiskit-tutorials/_build/html
mv tutorial_docs.tar.gz artifacts/.
- uses: actions/upload-artifact@v2
with:
name: tutorial_docs
path: artifacts