Update README.md #95
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: Python application | |
on: [push, pull_request] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: '3.10' | |
- name: Lint with flake8 and mypy | |
run: | | |
python3 -m pip install flake8 mypy | |
# stop the build if there are Python syntax errors or undefined names | |
./etc/pre-commit | |
- name: Test wheel with pytest | |
run: | | |
python3 -m pip install wheel # for bdist_wheel | |
python3 -m pip install pytest | |
python3 -m pip freeze | |
python3 setup.py sdist bdist_wheel | |
sh -c "cd /tmp && python3 -m pip install $PWD/dist/*.whl" # must be in a new dir to avoid finding build artifacts | |
python3 -m pip freeze | |
sh -c "cd /tmp && pytest $PWD/tests" # must be in a new dir to avoid finding source code |