This repository has been archived by the owner on Aug 31, 2023. It is now read-only.
Mark advocate as unmaintained #42
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, pull_request] | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-20.04] | |
requests_version: ["2.18.4", "2.23.0", "2.28.1"] | |
include: | |
- urllib3_version: "1.22" | |
python_version: "3.6" | |
pytest_version: "3.10.1" | |
# Make sure we're testing with an up-to-date urllib3 version, that can affect | |
# whether our hooks will work as well! | |
- requests_version: "2.28.1" | |
urllib3_version: "1.26.11" | |
python_version: "3.10" | |
pytest_version: "6.2.5" | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python ${{ matrix.python_version }} | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python_version }} | |
- name: Install dependencies | |
run: | | |
pip install "urllib3==${{matrix.urllib3_version}}" | |
pip install "pytest==${{matrix.pytest_version}}" | |
mkdir build | |
pip install --src build/ -e git+https://github.com/psf/requests@v${{matrix.requests_version}}#egg=requests -r requirements-test.txt | |
- name: Run tests | |
run: | | |
export ADVOCATE_BUILD_DIR=$(pwd) | |
export WANTED_REQUESTS_VERSION="${{matrix.requests_version}}" | |
export WANTED_URLLIB3_VERSION="${{matrix.urllib3_version}}" | |
pytest --cov=advocate --cov-config=.coveragerc | |
pushd build/requests && PYTHONPATH="${ADVOCATE_BUILD_DIR}" pytest -p requests_pytest_plugin && popd |