Add entry points #248
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: tests | |
on: | |
push: | |
paths: | |
- src/** | |
- test/** | |
- setup.py | |
- requirements.txt | |
- Makefile | |
pull_request: | |
workflow_dispatch: | |
jobs: | |
run-tests: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ ubuntu-latest, macos-latest, windows-latest ] | |
python: [ '3.8', '3.9', 'pypy-3.9', '3.10', '3.11' ] | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python }} | |
- name: install dependencies | |
run: | | |
python3 -m pip install pytest | |
python3 -m pip install -e . | |
- name: run tests | |
run: python3 -m pytest | |
# Test building from source distribution | |
test-build-from-source: | |
runs-on: ubuntu-latest | |
container: ${{ matrix.container }} | |
strategy: | |
matrix: | |
python_tag: ['cp311', 'pp39'] | |
include: | |
- os: ubuntu-latest | |
container: quay.io/pypa/manylinux2014_x86_64 # https://github.com/pypa/manylinux | |
steps: | |
- uses: actions/checkout@v3 | |
- name: set up python | |
run: | | |
PYT=`echo "${{ matrix.python_tag }}" | tr -d "."`; ls -d -1 /opt/python/$PYT-*/bin | head -n 1 >> $GITHUB_PATH | |
cat $GITHUB_PATH | |
- name: install dependencies | |
run: | | |
python3 -m pip install wheel | |
- name: build sdist | |
run: | | |
python3 setup.py sdist | |
- name: try to use it | |
run: | | |
tar xzf dist/slipcover*.tar.gz | |
cd slipcover* | |
python3 setup.py build | |
# Run a manylinux wheel build to verify build configuration | |
test-build-wheel-manylinux: | |
runs-on: ubuntu-latest | |
container: ${{ matrix.container }} | |
strategy: | |
matrix: | |
python_version: ['3.8', '3.9', '3.10', '3.11'] | |
include: | |
- os: ubuntu-latest | |
container: quay.io/pypa/manylinux2014_x86_64 # https://github.com/pypa/manylinux | |
steps: | |
- uses: actions/checkout@v3 | |
- name: set up python | |
run: | | |
PYV=`echo "${{ matrix.python_version }}" | tr -d "."`; ls -d -1 /opt/python/cp$PYV*/bin | head -n 1 >> $GITHUB_PATH | |
cat $GITHUB_PATH | |
- name: install dependencies | |
run: | | |
python3 -m pip install --upgrade pip # otherwise building 'cryptography' may fail | |
python3 -m pip install setuptools wheel twine | |
- name: build wheel | |
run: | | |
python3 setup.py bdist_wheel | |
- name: run auditwheel for manylinux | |
run: | | |
auditwheel repair dist/*.whl | |
rm -f dist/*.whl | |
mv wheelhouse/*.whl dist/ |