forked from microsoft/Qcodes
-
Notifications
You must be signed in to change notification settings - Fork 2
65 lines (61 loc) · 1.78 KB
/
pytest.yaml
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
name: Run mypy and pytest
on:
push:
branches:
- 'master'
- 'release/*'
- 'staging'
- 'trying'
tags:
- 'v*'
pull_request:
jobs:
pytestmypy:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
python-version: [3.7, 3.8, 3.9, "3.10"]
env:
DISPLAY: ':99.0'
OS: ${{ matrix.os }}
PYTHON: ${{ matrix.python-version }}
steps:
- uses: actions/[email protected]
with:
submodules: true
- name: setup ubuntu-latest xvfb
uses: ./.github/actions/setup-ubuntu-latest-xvfb
- name: Set up Python ${{ matrix.python-version }}
uses: actions/[email protected]
with:
python-version: ${{ matrix.python-version }}
- name: prepare pip cache
id: prepare-cache-pip
uses: ./.github/actions/prepare-cache-pip
- name: pip cache
uses: actions/[email protected]
with:
path: ${{ steps.prepare-cache-pip.outputs.cache-dir }}
key: ${{ runner.os }}-${{ matrix.python-version }}-pip-${{ hashFiles('**/requirements.txt') }}-${{ hashFiles('**/test_requirements.txt') }}-${{ hashFiles('**/setup.cfg') }}
restore-keys: |
${{ runner.os }}-${{ matrix.python-version }}-pip-
- name: install requirements.txt
run: |
pip install -r requirements.txt
- name: install test_requirements.txt
run: |
pip install -r test_requirements.txt
- name: install qcodes
run: |
pip install .
- name: Run Mypy
run: mypy qcodes
- name: Run tests
run: |
pytest --cov=qcodes --cov-report xml --hypothesis-profile ci qcodes
- name: Upload coverage to Codecov
uses: codecov/[email protected]
with:
file: ./coverage.xml
env_vars: OS,PYTHON