Add library version to User Agent #122
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: lint and tests | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
# We still support python 3.7 for entreprise customers running on legacy | |
# Python versions | |
python-version: ['3.7', '3.10', '3.12'] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: setup python ${{ matrix.python-version }} | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: install deps | |
run: | | |
python -m pip install --upgrade pip setuptools wheel flake8 twine | |
python setup.py develop | |
pip install -e .[test,lint] | |
- name: lint | |
run: | | |
scripts/lint.sh | |
- name: tests | |
run: | | |
pytest -v tests | |
# Test the build and run twine to check we are pypi compatible | |
- name: check build | |
run: | | |
python setup.py bdist && twine check dist/* | |
# Even thought we have readthedocs build docs on every MR, this is useful | |
# because we build with -W --keep-going (see Makefile) and this will | |
# therefore fail on warnings that could be ignored by readthedocs and | |
# lead to half-broken docs | |
- name: build docs | |
# This should make the version in .readthedocs.yaml in the repository root | |
if: matrix.python-version == '3.12' | |
run: | | |
cd docs | |
python -m pip install -r requirements.txt | |
make html | |