9
9
- ' *'
10
10
pull_request :
11
11
env :
12
- LATEST_PY_VERSION : ' 3.9 '
12
+ LATEST_PY_VERSION : ' 3.13 '
13
13
14
14
jobs :
15
15
tests :
16
16
runs-on : ubuntu-latest
17
17
strategy :
18
18
matrix :
19
- python-version : ['3.7', '3.8', '3.9']
19
+ python-version :
20
+ - ' 3.9'
21
+ - ' 3.10'
22
+ - ' 3.11'
23
+ - ' 3.12'
24
+ - ' 3.13'
20
25
21
26
steps :
22
- - uses : actions/checkout@v2
27
+ - uses : actions/checkout@v4
23
28
- name : Set up Python ${{ matrix.python-version }}
24
- uses : actions/setup-python@v2
29
+ uses : actions/setup-python@v5
25
30
with :
26
31
python-version : ${{ matrix.python-version }}
27
32
- name : Install dependencies
28
33
run : |
29
34
python -m pip install --upgrade pip
30
- python -m pip install tox
31
-
32
- # Run tox using the version of Python in `PATH`
33
- - name : Run Tox
34
- run : tox -e py
35
+ python -m pip install -e ".[test]"
35
36
36
37
- name : Run pre-commit
37
38
if : ${{ matrix.python-version == env.LATEST_PY_VERSION }}
38
39
run : |
39
40
python -m pip install pre-commit
40
41
pre-commit run --all-files
41
42
43
+ - name : Run tests
44
+ run : python -m pytest --cov rio_tiler_mvt --cov-report xml --cov-report term-missing -s -vv
45
+
42
46
- name : Upload Results
43
47
if : ${{ matrix.python-version == env.LATEST_PY_VERSION }}
44
- uses : codecov/codecov-action@v1
48
+ uses : codecov/codecov-action@v4
45
49
with :
46
50
file : ./coverage.xml
47
51
flags : unittests
@@ -53,31 +57,35 @@ jobs:
53
57
runs-on : ubuntu-latest
54
58
if : startsWith(github.event.ref, 'refs/tags') || github.event_name == 'release'
55
59
steps :
56
- - uses : actions/checkout@v2
60
+ - uses : actions/checkout@v4
57
61
- name : Set up Python
58
- uses : actions/setup-python@v1
62
+ uses : actions/setup-python@v5
59
63
with :
60
64
python-version : ${{ env.LATEST_PY_VERSION }}
61
65
62
66
- name : Install dependencies
63
67
run : |
64
68
python -m pip install --upgrade pip
65
- python -m pip install tox numpy cython
69
+ python -m pip install numpy cython wheel setuptools twine
66
70
67
71
- name : Set tag version
68
72
id : tag
69
- # https://stackoverflow.com/questions/58177786/get-the-current-pushed-tag-in-github-actions
70
- run : echo ::set-output name=tag::${GITHUB_REF#refs/*/}
73
+ run : |
74
+ echo "version=${GITHUB_REF#refs/*/}"
75
+ echo "version=${GITHUB_REF#refs/*/}" >> $GITHUB_OUTPUT
71
76
72
77
- name : Set module version
73
78
id : module
74
- # https://stackoverflow.com/questions/58177786/get-the-current-pushed-tag-in-github-actions
75
- run : echo ::set-output name=version::$(python setup.py --version)
79
+ run : |
80
+ hatch --quiet version
81
+ echo "version=$(python setup.py --version)" >> $GITHUB_OUTPUT
82
+
83
+ - name : Build sdist
84
+ run : python setup.py sdist
76
85
77
86
- name : Build and publish
78
- if : steps.tag.outputs.tag == steps.module.outputs.version
87
+ if : ${{ steps.tag.outputs.version }} == ${{ steps.module.outputs.version}}
79
88
env :
80
- TOXENV : release
81
89
TWINE_USERNAME : ${{ secrets.PYPI_USERNAME }}
82
90
TWINE_PASSWORD : ${{ secrets.PYPI_PASSWORD }}
83
- run : tox
91
+ run : twine upload --skip-existing dist/*
0 commit comments