forked from eclipse-basyx/basyx-python-sdk
-
Notifications
You must be signed in to change notification settings - Fork 2
80 lines (73 loc) · 2.06 KB
/
ci.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
name: ci
on: [push, pull_request]
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.7", "3.9", "3.11"]
env:
COUCHDB_ADMIN_PASSWORD: "yo0Quai3"
services:
couchdb:
image: couchdb:3
ports:
- 5984:5984
env:
COUCHDB_USER: "admin"
COUCHDB_PASSWORD: ${{ env.COUCHDB_ADMIN_PASSWORD }}
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 Python dependencies
run: |
python -m pip install --upgrade pip
pip install coverage
pip install -r requirements.txt
- name: Setup test config and CouchDB database server
run: |
python test/_helper/setup_testdb.py -u "admin" -p "$COUCHDB_ADMIN_PASSWORD"
- name: Test with coverage + unittest
run: |
coverage run --source=basyx -m unittest
- name: Report test coverage
if: ${{ always() }}
run: |
coverage report -m
static-analysis:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.10
uses: actions/setup-python@v2
with:
python-version: "3.10"
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
pip install pycodestyle mypy
pip install -r requirements.txt
- name: Check typing with MyPy
run: |
mypy basyx test
- name: Check code style with PyCodestyle
run: |
pycodestyle --count --max-line-length 120 basyx test
package:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.10
uses: actions/setup-python@v2
with:
python-version: "3.10"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel
- name: Create source and wheel dist
run: |
python setup.py sdist bdist_wheel