Skip to content

Add examples of (1) common setup per class and serial test execution (2) replication testing #10

Add examples of (1) common setup per class and serial test execution (2) replication testing

Add examples of (1) common setup per class and serial test execution (2) replication testing #10

Workflow file for this run

name: ci
on:
push:
pull_request:
env:
VALKEY_REPO_URL: https://github.com/valkey-io/valkey.git
jobs:
build-ubuntu-latest:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
pytest-version: ['6.2.5', '7.4.3']
steps:
- uses: actions/checkout@v4
- name: Set the server verison for python integeration tests
run: echo "SERVER_VERSION=unstable" >> $GITHUB_ENV
- name: Make valkey-server binary
run: |
mkdir -p "tests/.build/binaries/unstable"
cd tests/.build
git clone "${{ env.VALKEY_REPO_URL }}"
cd valkey
git checkout unstable
make -j
cp src/valkey-server ../binaries/unstable/
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.9'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install --force-reinstall pytest==${{ matrix.pytest-version }}
- name: Run python formatting check
run: python -m black --check . || (echo "Please run 'black .' to fix formatting issues."; exit 1)
- name: Run integration tests
env:
PYTHONPATH: ${{ github.workspace }}/src
run: python -m pytest --cache-clear -v "tests/"