fix(deps): 🧪 add httpx module for testing #2
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
# This workflow will install Python dependencies, run tests and lint with a single version of Python | |
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python | |
name: Unit tests | |
on: | |
push: | |
branches: [ "next" ] | |
pull_request: | |
branches: [ "next" ] | |
permissions: | |
contents: read | |
jobs: | |
build: | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: ["3.8", "3.9", "3.10", "3.11"] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install poetry | |
uses: abatilo/actions-poetry@v2 | |
- name: Setup a local virtual environment (if no poetry.toml file) | |
run: | | |
poetry config virtualenvs.create true --local | |
poetry config virtualenvs.in-project true --local | |
- uses: actions/cache@v3 | |
name: Define a cache for the virtual environment based on the dependencies lock file | |
with: | |
path: ./.venv | |
key: venv-${{ hashFiles('poetry.lock') }} | |
- name: Install the project dependencies | |
run: bash scripts/install_dev_deps.sh | |
- name: Redis Server in GitHub Actions | |
uses: supercharge/[email protected] | |
- name: Run the automated tests | |
run: poetry run pytest -v -s |