Dragonfly test support #2
Workflow file for this run
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 Dragonfly | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- master | |
workflow_dispatch: | |
inputs: | |
max-failures: | |
description: 'Maximum number of failures before stopping the test' | |
required: false | |
default: 10 | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
permissions: | |
pull-requests: write | |
services: | |
redis: | |
image: docker.dragonflydb.io/dragonflydb/dragonfly:latest | |
ports: | |
- 6380:6379 | |
options: >- | |
--health-cmd "redis-cli ping" | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
cache-dependency-path: poetry.lock | |
python-version: 3.12 | |
- name: Install dependencies | |
env: | |
PYTHON_KEYRING_BACKEND: keyring.backends.null.Keyring | |
run: | | |
python -m pip --quiet install poetry | |
echo "$HOME/.poetry/bin" >> $GITHUB_PATH | |
poetry install | |
poetry run pip install "fakeredis[json,bf,cf,lua]" | |
- name: Test without coverage | |
run: | | |
poetry run pytest --maxfail=${{inputs.max-failures}} --html=report.html --self-contained-html -v -m "not slow" | |
- name: Collect Tests Result | |
uses: actions/upload-artifact@v4 | |
with: | |
name: tests-result | |
path: report.html |