Skip to content

Avoid using setuptools in corpus test #254

Avoid using setuptools in corpus test

Avoid using setuptools in corpus test #254

Workflow file for this run

name: Release Test
on: [push]
jobs:
package:
name: Create Package
runs-on: ubuntu-latest
container:
image: danielflook/python-minifier-build:python3.12-2023-09-25
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set version statically
run: |
pip3 install setuptools_scm
VERSION="$(python3 -m setuptools_scm)"
sed -i "s/setup_requires=.*/version='$VERSION',/; s/use_scm_version=.*//" setup.py
- name: Create Packages
run: |
pip3 install --upgrade build
python3 -m build
- 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.12-2023-09-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:
fail-fast: false
matrix:
python: ["2.7", "3.3", "3.4", "3.5", "3.6", "3.7", "3.8", "3.9", "3.10", "3.11", "3.12"]
package_type: [.tar.gz, .whl]
exclude:
- python: 2.7
package_type: .whl
container:
image: danielflook/python-minifier-build:python${{ matrix.python }}-2023-09-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.12-2023-09-25
steps:
- uses: actions/download-artifact@v3
with:
name: dist
path: dist/
- name: Install package
run: |
pip3.12 install dist/*${{ matrix.package_type }}
- name: Checkout
uses: actions/checkout@v3
- name: Test typing
run: |
pip3.12 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