-
Notifications
You must be signed in to change notification settings - Fork 224
47 lines (43 loc) · 1.29 KB
/
python-client.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
name: Python client checks, package build and deployment
on:
workflow_dispatch:
push:
branches:
- develop
- master
paths:
- ./client/
- .github/workflows/python-client.yml
pull_request:
paths:
- ./client/
- .github/workflows/python-client.yml
jobs:
lint:
name: Linting
runs-on: ubuntu-latest
steps:
- name: Clone
uses: actions/checkout@v3
- run: pip install flake8
- name: Flake8 lint Python code
run: (cd client && find src/ -type f -name '*.py' -exec flake8 --max-line-length=120 '{}' '+')
mypy:
name: Type checking
runs-on: ubuntu-latest
steps:
- name: Clone
uses: actions/checkout@v3
- run: pip install mypy
- name: Mypy type checking
run: (cd client && mypy src/)
packaging:
if: github.event_name == 'push'
name: Build, test and deploy the Python package
uses: LedgerHQ/ledger-app-workflows/.github/workflows/reusable_pypi_deployment.yml@pypi_deployment
with:
package_directory: "client/"
stable_deployment: ${{ github.ref == 'refs/heads/master' }}
check_changelog_version: true
secrets:
pypi_token: ${{ github.ref == 'refs/heads/master' && secrets.PYPI_PUBLIC_API_TOKEN || secrets.TEST_PYPI_PUBLIC_API_TOKEN }}