test:Dragonfly #28
This file contains hidden or 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: | |
| workflow_dispatch: | |
| pull_request: | |
| branches: | |
| - master | |
| concurrency: | |
| group: dragon-fly-${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| tests: | |
| - "test_json" | |
| - "test_mixins" | |
| - "test_stack" | |
| - "test_hypothesis" | |
| - "test_asyncredis.py" | |
| - "test_translations.py" | |
| permissions: | |
| pull-requests: write | |
| services: | |
| redis: | |
| image: docker.dragonflydb.io/dragonflydb/dragonfly:latest | |
| ports: | |
| - 6390:6379 | |
| options: >- | |
| --health-cmd "redis-cli ping" | |
| --health-interval 10s | |
| --health-timeout 5s | |
| --health-retries 5 | |
| steps: | |
| - uses: actions/checkout@v5 | |
| with: | |
| persist-credentials: false | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v6 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| cache-dependency-path: uv.lock | |
| python-version: 3.13 | |
| - name: Install dependencies | |
| env: | |
| PYTHON_KEYRING_BACKEND: keyring.backends.null.Keyring | |
| run: | | |
| uv sync --all-extras | |
| - name: Test without coverage | |
| run: | | |
| uv run pytest test/${{ matrix.tests }} \ | |
| --html=report-${{ matrix.tests }}.html \ | |
| --self-contained-html \ | |
| -v | |
| - name: Upload Tests Result | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: tests-result-${{ matrix.tests }} | |
| path: report-${{ matrix.tests }}.html | |
| upload-results: | |
| needs: test | |
| if: always() | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| steps: | |
| - name: Collect Tests Result | |
| uses: actions/upload-artifact/merge@v4 | |
| with: | |
| delete-merged: true |