Version bump #24
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: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- master | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: ["3.8", "3.9", "3.10"] | |
redis-version: [5, 6] | |
pydantic-version: ["1.6.1", "2.6.1"] | |
steps: | |
- name: Git checkout | |
uses: actions/checkout@v2 | |
- name: Setup python | |
uses: actions/setup-python@v1 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Setup redis | |
uses: supercharge/[email protected] | |
with: | |
redis-version: ${{ matrix.redis-version }} | |
- name: Cache Poetry dependencies | |
uses: actions/cache@v2 | |
with: | |
path: | | |
~/.cache/pypoetry | |
!~/.cache/pypoetry/artifacts | |
key: ${{ runner.os }}-poetry-${{ hashFiles('**/poetry.lock') }} | |
restore-keys: | | |
${{ runner.os }}-poetry- | |
- name: Install Poetry | |
uses: snok/install-poetry@v1 | |
with: | |
version: 1.6.1 | |
- name: Install dependencies | |
run: poetry install | |
- name: Install Pydantic | |
run: pip install pydantic==${{ matrix.pydantic-version }} | |
- name: Flake8 | |
run: poetry run flake8 jotbox tests | |
- name: Black | |
run: poetry run black --check jotbox tests | |
- name: MyPy | |
run: poetry run mypy jotbox tests | |
- name: Run tests | |
run: poetry run pytest -v --cov=jotbox tests/ | |
env: | |
TEST_REDIS_URI: redis://127.0.0.1 |