Fix Django v4 support #86
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 variety of Python versions | |
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions | |
name: Python package | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: ["2.7", "3.7", "3.8", "3.9", "3.10", "3.11"] | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: 2 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
run: | | |
sudo apt-get install libmemcached-dev | |
python -m pip install --upgrade pip | |
python --version | grep '3.' && python -m pip install black | |
python -m pip install -e '.[tests]' | |
- name: Lint with black | |
run: | | |
black --check ring tests setup.py | |
if: matrix.python-version != '2.7' | |
- name: Start containers | |
run: docker-compose -f "docker-compose.yml" up -d --build | |
- name: Test with pytest | |
run: | | |
pytest | |
- name: Stop containers | |
run: docker-compose -f "docker-compose.yml" down | |
- name: Codecov | |
run: bash <(curl -s https://codecov.io/bash) |