forked from dflook/python-minifier
-
Notifications
You must be signed in to change notification settings - Fork 0
122 lines (102 loc) · 3.05 KB
/
release_test.yaml
File metadata and controls
122 lines (102 loc) · 3.05 KB
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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
name: Release Test
on: [push]
jobs:
package:
name: Create Package
runs-on: ubuntu-latest
container:
image: danielflook/python-minifier-build:python3.11-2022-10-25
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set version statically
run: |
VERSION="$(python3 setup.py --version)"
sed -i "s/setup_requires=.*/version='$VERSION',/; s/use_scm_version=.*//" setup.py
- name: Create Packages
run: |
pip3 install --upgrade setuptools wheel twine
python3 setup.py sdist bdist_wheel --universal
- uses: actions/upload-artifact@v3
with:
name: dist
path: dist/
if-no-files-found: error
test_docs:
name: Test Documentation
runs-on: ubuntu-latest
needs: [package]
container:
image: danielflook/python-minifier-build:python3.11-2022-10-25
steps:
- uses: actions/download-artifact@v3
with:
name: dist
path: dist/
- name: Install package
run: |
pip3 install dist/*.tar.gz
pyminify --version
- name: Checkout
uses: actions/checkout@v3
- name: Build documentation
run: |
pip3 install sphinx sphinxcontrib-programoutput sphinx_rtd_theme
sphinx-build docs/source /tmp/build
test_package:
name: Test Package
runs-on: ubuntu-latest
needs: [package]
strategy:
matrix:
python: ["2.7", "3.3", "3.4", "3.5", "3.6", "3.7", "3.8", "3.9", "3.10", "3.11"]
package_type: [.tar.gz, .whl]
container:
image: danielflook/python-minifier-build:python${{ matrix.python }}-2022-10-25
steps:
- uses: actions/download-artifact@v3
with:
name: dist
path: dist/
- name: Install package
run: |
pip${{ matrix.python }} install dist/*${{ matrix.package_type }}
pyminify --version
- name: Checkout
uses: actions/checkout@v3
- name: Test pyminify
run: |
set -x
cat setup.py | pyminify -
pyminify setup.py > /tmp/out.min.py
pyminify setup.py --output /tmp/out.min.py2
pyminify setup.py src test --in-place
test_typing:
runs-on: ubuntu-latest
needs: [package]
strategy:
matrix:
package_type: [.tar.gz, .whl]
container:
image: danielflook/python-minifier-build:python3.11-2022-10-25
steps:
- uses: actions/download-artifact@v3
with:
name: dist
path: dist/
- name: Install package
run: |
pip3.11 install dist/*${{ matrix.package_type }}
- name: Checkout
uses: actions/checkout@v3
- name: Test typing
run: |
pip3.11 install mypy types-setuptools
mypy --strict typing_test/test_typing.py
if mypy --strict typing_test/test_badtyping.py; then
echo "Bad types weren't detected"
exit 1
fi
stubtest python_minifier