-
Notifications
You must be signed in to change notification settings - Fork 19
93 lines (81 loc) · 2.94 KB
/
pythonpackage.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
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: Python package
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.x]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Cache pip
uses: actions/cache@v1
with:
# This path is specific to Ubuntu
path: ~/.cache/pip
# Look to see if there is a cache hit for the corresponding requirements file
key: ${{ runner.os }}-pip-${{ hashFiles('requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
${{ runner.os }}-
- name: Install dependencies
run: |
python -m pip install --upgrade pip pylint wheel
pip install -r requirements.txt
pip install -r require_test.txt
pip install flake8
- name: Lint with flake8
run: |
python -m flake8 rssd
# - name: Lint with pylint
# run: |
# python -m pylint rssd
- name: Unit Test
run: |
# pytest
coverage run -m unittest test.test_RSSD
coverage run -a -m unittest test.test_yaVISA
coverage run -a -m unittest discover -b -p test_HW_DSO*
coverage run -a -m unittest discover -b -p test_HW_NRQ*
coverage run -a -m unittest discover -b -p test_HW_NRP*
coverage run -a -m unittest discover -b -p test_HW_OSP*
coverage run -a -m unittest discover -b -p test_HW_OTA*
coverage run -a -m unittest discover -b -p test_HW_PNA*
coverage run -a -m unittest discover -b -p test_HW_RCT*
coverage run -a -m unittest discover -b -p test_HW_VNA*
coverage run -a -m unittest discover -b -p test_HW_VSA*
coverage run -a -m unittest discover -b -p test_HW_VSE*
coverage run -a -m unittest discover -b -p test_HW_VSG*
coverage run -a -m unittest discover -b -p test_HW_VST*.py
coverage run -a -m unittest discover -b -p test_SW*
- name: Coveralls Python
uses: AndreMiras/coveralls-python-action@develop
with:
parallel: true
flag-name: Unit Test
# coveralls_finish:
# needs: build
# runs-on: ubuntu-latest
# steps:
# - name: Install dependencies
# run: |
# python -m pip install --upgrade pip pylint wheel
# pip install -r requirements.txt
# - name: Coveralls Finished
# uses: AndreMiras/coveralls-python-action@develop
# with:
# parallel-finished: true
# - name: Coveralls
# uses: coverallsapp/github-action@master
# with:
# github-token: ${{ secrets.GITHUB_TOKEN }}