Add Mock.get_mock method #104
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: Test and lint | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: | |
- "**" | |
env: | |
PYTHON_VERSION: "3.8" | |
jobs: | |
test: | |
name: Run unit tests | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: | |
[ | |
"pypy-3.8", | |
"pypy-3.9", | |
"pypy-3.10", | |
"3.8", | |
"3.9", | |
"3.10", | |
"3.11", | |
"3.12", | |
"3.13-dev", | |
] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
cache: "pip" | |
- name: Install dependencies | |
run: | | |
pip install tox tox-gh-actions | |
- name: Run tests with tox | |
run: tox | |
lint: | |
name: Run linters | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Poetry | |
run: pipx install poetry | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ env.PYTHON_VERSION }} | |
cache: "poetry" | |
- name: Install dependencies | |
run: | | |
poetry config virtualenvs.in-project true | |
poetry install | |
- name: Run linters | |
run: poetry run make lint | |
test-docs: | |
name: Test documentation | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Poetry | |
run: pipx install poetry | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ env.PYTHON_VERSION }} | |
cache: "poetry" | |
- name: Install dependencies | |
run: | | |
poetry config virtualenvs.in-project true | |
poetry install | |
- name: Run linters | |
run: poetry run make docs |