-
Notifications
You must be signed in to change notification settings - Fork 6
50 lines (44 loc) · 1.26 KB
/
unittests.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
name: Unit Tests
on:
push:
branches: [ "main" ]
pull_request:
workflow_dispatch:
jobs:
linter:
name: Linter
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v2
- name: Set up Python 3.8
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install pylint flake8
pip install -e ".[full]"
# - name: Lint with pylint
# run: python -m pylint --disable=all -e W0311 --jobs=0 --indent-string=' ' **/*.py
- name: Lint with flake8
run: flake8 klongpy/ --indent-size=2 --select=F,E112,E113,E304,E502,E702,E703,E71,E72,W191,W6,W605 --ignore=E731,W605,F405,F403 --statistics -j4
# - name: Lint klongpy with pylint
# run: pylint klongpy/
testcpu:
name: CPU Tests
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v2
- name: Update packages
run: sudo apt-get update
- name: Set up Python 3.8
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Install Dependencies
run: pip install -e ".[full]"
- name: Run unittest
run: python3 -m unittest -v