-
-
Notifications
You must be signed in to change notification settings - Fork 53
121 lines (103 loc) · 3.55 KB
/
Copy pathtest.yaml
File metadata and controls
121 lines (103 loc) · 3.55 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
name: Unit Test
on: [push]
permissions:
contents: read
jobs:
test:
name: Test
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
python: ["python2.7", "python3.3", "python3.4", "python3.5", "python3.6", "python3.7", "python3.8", "python3.9", "python3.10", "python3.11", "python3.12", "python3.13", "pypy", "pypy3"]
steps:
- name: Checkout
uses: actions/checkout@v4.2.2
with:
fetch-depth: 1
show-progress: false
persist-credentials: false
- name: Set version statically
run: |
VERSION=0.0.0
sed -i "s/setup_requires=.*/version='$VERSION',/; s/use_scm_version=.*//" setup.py
- name: Run tests
uses: ./.github/actions/run-in-container
with:
image: danielflook/python-minifier-build:${{ matrix.python }}-2024-09-15
run: |
tox -r -e $(echo "${{ matrix.python }}" | tr -d .)
test-windows:
name: Test Windows
runs-on: windows-2025
strategy:
fail-fast: false
matrix:
python-version: ['2.7', '3.6', '3.7', '3.8', '3.9', '3.10', '3.11', '3.12', '3.13']
steps:
- name: Checkout
uses: actions/checkout@v4.2.2
with:
fetch-depth: 1
show-progress: false
persist-credentials: false
- name: Set up Python
if: ${{ matrix.python-version != '2.7' }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Set up Python
if: ${{ matrix.python-version == '2.7' }}
uses: LizardByte/actions/actions/setup_python@eddc8fc8b27048e25040e37e3585bd3ef9a968ed # master
with:
python-version: ${{ matrix.python-version }}
- name: Set version statically
shell: powershell
run: |
$content = Get-Content setup.py
$content = $content -replace "setup_requires=.*", "version='0.0.0',"
$content = $content -replace "use_scm_version=.*", ""
Set-Content setup.py $content
- name: Install tox
run: |
python -m pip install --upgrade pip
pip install tox
- name: Run tests
run: |
tox -c tox-windows.ini -r -e ${{ matrix.python-version }}
lint:
runs-on: ubuntu-24.04
name: Linting
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 1
show-progress: false
persist-credentials: false
- name: Actions workflows
run: |
bash <(curl https://raw.githubusercontent.com/rhysd/actionlint/main/scripts/download-actionlint.bash)
./actionlint
- name: Install the latest version of uv
uses: astral-sh/setup-uv@f94ec6bedd8674c4426838e6b50417d36b6ab231 # v5.3.1
- name: Actions Security Check
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
uvx zizmor --format plain .
- name: Lint CHANGELOG
uses: DavidAnson/markdownlint-cli2-action@05f32210e84442804257b2a6f20b273450ec8265 # v19
with:
config: '.config/changelog.markdownlint.yaml'
globs: 'CHANGELOG.md'
- name: Lint Other Markdown
uses: DavidAnson/markdownlint-cli2-action@05f32210e84442804257b2a6f20b273450ec8265 # v19
with:
config: '.config/.markdownlint.yaml'
globs: |
**/README.md
- uses: astral-sh/ruff-action@9828f49eb4cadf267b40eaa330295c412c68c1f9 # v3
with:
args: --config=.config/ruff.toml check
src: src