Skip to content

CI fixes #105

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
May 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 21 additions & 7 deletions .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,20 +32,30 @@ jobs:

- name: prepare the environment
run: |
pip install -U setuptools pip poetry tox-docker tox-poetry
python -m venv .venv
source .venv/bin/activate
pip install -U setuptools pip poetry==1.3.2 tox-poetry
poetry config virtualenvs.create false
poetry install
- name: lint
run: tox -e linters
run: |
python -m venv .venv
source .venv/bin/activate
tox -e linters

tests:
name: Test on ${{ matrix.platform }} with Python ${{ matrix.python }}
runs-on: ${{ matrix.platform }}
runs-on: ubuntu-latest
services:
stack:
image: redis/redis-stack-server:edge
options: --health-cmd="redis-cli ping" --health-interval=10s --health-timeout=5s --health-retries=3
ports:
- 6379:6379
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
strategy:
matrix:
platform: ['ubuntu-20.04']
python: ['3.7', '3.8', '3.9', '3.10', '3.11']
fail-fast: false
steps:
Expand All @@ -54,15 +64,19 @@ jobs:
uses: actions/setup-python@v4
with:
python-version: ${{matrix.python}}
architecture: x64

- name: Prepare environment
run: |
pip install -U setuptools pip poetry tox-docker tox-poetry
python -m venv .venv
source .venv/bin/activate
pip install -U setuptools pip poetry==1.3.2 tox-poetry
poetry config virtualenvs.create false
poetry install
- name: Run tests
run: tox -e cover
run: |
python -m venv .venv
source .venv/bin/activate
tox -e cover
- name: Upload coverage
uses: codecov/codecov-action@v3
if: matrix.python == '3.9' && matrix.platform != 'macos-11'
Expand Down
5 changes: 3 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ redis = "^4.5.1"
pathos = "^0.2.8"

[tool.poetry.dev-dependencies]
codecov = "^2.1.11"
codecov = "2.1.13"
flake8 = "^3.9.2"
tox = "^3.15.0"
tox-poetry = "^0.3.0"
Expand All @@ -47,7 +47,8 @@ typing-extensions = "^4.1.1"
black = "^22.6.0"
isort = "^5.10.1"
flynt = "^0.76"
tox-docker = "^3.1.0"
# https://github.com/ionrock/cachecontrol/issues/292
urllib3 = "1.26.15"

[build-system]
requires = ["poetry-core>=1.0.0"]
Expand Down
13 changes: 4 additions & 9 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,6 @@ exclude =.git,.tox,dist,doc,*/__pycache__/*,*test*.py
profile = black
multi_line_output = 3

[docker:redisgraph]
name = redisgraph
image = redislabs/redisgraph:edge
ports = 6379:6379/tcp

[testenv:cover]
whitelist_externals = find
docker = redisgraph
Expand All @@ -31,8 +26,8 @@ commands =

[testenv:linters]
commands =
flake8 --show-source
black --target-version py36 --check --diff .
isort --check-only --dif .
flake8 --show-source redisgraph_bulk_loader
black --target-version py36 --check --diff redisgraph_bulk_loader
isort --check-only --dif redisgraph_bulk_loader
vulture redisgraph_bulk_loader/ --min-confidence 80
flynt --fail-on-change --dry-run .
flynt --fail-on-change --dry-run redisgraph_bulk_loader