-
-
Notifications
You must be signed in to change notification settings - Fork 0
75 lines (62 loc) · 1.77 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
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
---
name: Python Package
on:
push:
branches: [master]
pull_request:
branches: [master]
env:
TWINE_PASSWORD: ${{secrets.TWINE_PASSWORD}}
GITHUB_API_TOKEN: ${{secrets.API_TOKEN}}
jobs:
build:
runs-on: ${{matrix.system}}
strategy:
matrix:
python-version:
- "3.11"
system:
- ubuntu-latest
- macos-latest
- windows-latest
env:
PYTHON_VERSION: ${{matrix.python-version}}
steps:
- uses: actions/checkout@master
with:
submodules: recursive
- name: python${{matrix.python-version}} setup
uses: actions/setup-python@main
with:
python-version: ${{matrix.python-version}}
cache: pip
- run: pip${{matrix.python-version}} install vmklib
- run: mk python-sa-types
- name: lint and build
run: mk python-lint python-sa yaml python-build-once
env:
PY_LINT_MYPY_EXTRA_ARGS: --no-incremental
- run: mk docs
if: |
matrix.python-version == '3.11'
&& matrix.system == 'ubuntu-latest'
- run: mk python-test
env:
PY_TEST_EXTRA_ARGS: --cov-report=xml
- uses: codecov/codecov-action@v3
- run: mk pypi-upload-ci
env:
TWINE_USERNAME: __token__
if: |
matrix.python-version == '3.11'
&& matrix.system == 'ubuntu-latest'
&& env.TWINE_PASSWORD != ''
&& github.ref_name == 'master'
- run: |
mk python-release owner=vkottler \
repo=runtimepy version=2.10.2
if: |
matrix.python-version == '3.11'
&& matrix.system == 'ubuntu-latest'
&& env.GITHUB_API_TOKEN != ''
&& github.ref_name == 'master'