-
Notifications
You must be signed in to change notification settings - Fork 83
47 lines (43 loc) · 1.5 KB
/
python-package.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
# 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: [ '**' ]
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: true
steps:
- uses: actions/checkout@v3
- name: Install dependencies
run: |
python -m pip install setuptools==58.2.0 -e .[devenv]
sudo apt-get update
sudo apt-get install libreoffice
- name: Check style with black
run: |
# stop the build if there are Python syntax errors or undefined names
black . --check
- name: Lint with flake8
run: |
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --max-line-length=120 --statistics
- name: Check the packaging
run: |
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
pyroma -d .
- name: And MANIFEST
run: |
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
check-manifest
- name: Test with pytest
run: |
PYTHONPATH=/ pytest --cov=unoserver
coverage xml
- name: Upload coverage
run: |
bash <(curl -Ls https://coverage.codacy.com/get.sh) report -t 6ebaf74314ff4ccd8e87d1f988a4aa2f -r coverage.xml