-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (46 loc) · 1.62 KB
/
python.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
# https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
name: Python
on: [push]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10", "3.12"]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install poetry
run: pipx install poetry
- uses: actions/setup-python@v4
with:
python-version: '3.9'
cache: 'poetry'
- name: install (dev) dependencies
run: poetry install --with dev
- name: lint (ruff)
run: |
# stop the build if there are Python syntax errors or undefined names
poetry run ruff --output-format=github --select=E9,F63,F7,F82 --target-version=py310 .
# default set of ruff rules with GitHub Annotations
poetry run ruff --output-format=github --target-version=py310 .
- name: lint (flak8, black)
run: |
poetry run flake8 sagemcom_f3896_client tests
poetry run black --check --diff sagemcom_f3896_client tests
- name: test
run: poetry run pytest --cov sagemcom_f3896 --cov-report html -qq -o console_output_style=count -p no:sugar tests
- name: package and test packaging
run: |
poetry build
poetry run twine check dist/*
poetry run check-manifest
- name: Save artifacts
uses: actions/upload-artifact@v3
with:
name: dist
path: |
dist