File: test-dragonfly.yml

package info (click to toggle)
python-fakeredis 2.29.0-6
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,820 kB
  • sloc: python: 18,993; sh: 8; makefile: 5
file content (80 lines) | stat: -rw-r--r-- 2,039 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
---
name: Test Dragonfly

on:
  workflow_dispatch:


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_connection.py"
          - "test_asyncredis.py"
          - "test_general.py"
          - "test_scan.py"
          - "test_zadd.py"
          - "test_translations.py"
          - "test_sortedset_commands.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@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 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