the tabbed example code for python (#3002) #71
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: Documentation Tests | |
on: | |
push: | |
pull_request: | |
workflow_dispatch: | |
permissions: | |
contents: read | |
jobs: | |
doctests: | |
runs-on: ubuntu-latest | |
services: | |
redis-stack: | |
image: redis/redis-stack-server:latest | |
options: >- | |
--health-cmd "redis-cli ping" --health-interval 10s --health-timeout 5s --health-retries 5 | |
ports: | |
- 6379:6379 | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: 3.9 | |
cache: 'pip' | |
- run: | | |
sudo apt update | |
sudo apt install -y redis-tools | |
- name: lint check | |
run: | | |
pip install -r dev_requirements.txt | |
pip install -r requirements.txt | |
pip install -r doctests/requirements.txt | |
isort -l 80 --profile black --check-only --diff doctests/*.py | |
black -l 80 --target-version py39 --check --diff doctests/*.py | |
- name: run tests | |
run: | | |
python setup.py build | |
python setup.py install | |
sh doctests/run_examples.sh |