-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c0e29e1
commit 5870eb0
Showing
5 changed files
with
151 additions
and
1 deletion.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
name: black | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: psf/black@stable | ||
with: | ||
options: "--check --verbose" | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,104 @@ | ||
name: CI | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: | ||
- '3.10' | ||
- '3.11' | ||
- '3.12' | ||
django-version: | ||
- '4.2' | ||
- '5.0' | ||
- '5.1' | ||
valkey-version: | ||
- 'latest' | ||
|
||
# Only test pre-release dependencies for the latest Python. | ||
include: | ||
# Django 4.2 and python 3.8 with latest redis | ||
- django-version: '4.2' | ||
valkey-version: 'latest' | ||
python-version: '3.8' | ||
|
||
# Django 4.2 and python 3.9 with latest redis | ||
- django-version: '4.2' | ||
valkey-version: 'latest' | ||
python-version: '3.9' | ||
|
||
# latest Django with pre-release redis | ||
- django-version: '5.0' | ||
valkey-version: 'master' | ||
python-version: '3.11' | ||
|
||
# latest redis with pre-release Django | ||
- django-version: 'main' | ||
valkey-version: 'latest' | ||
python-version: '3.12' | ||
|
||
# pre-release Django and redis | ||
- django-version: 'main' | ||
valkey-version: 'master' | ||
python-version: '3.11' | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Cache | ||
id: cached-poetry | ||
uses: actions/cache@v4 | ||
with: | ||
path: ~/.local | ||
key: poetry-0 | ||
|
||
- name: Install poetry | ||
if: steps.cached-poetry.outputs.cache-hit != 'true' | ||
uses: snok/install-poetry@v1 | ||
with: | ||
installer-parallel: true | ||
|
||
- name: install dependencies | ||
run: poetry install --no-interaction --no-root --all-extras --with dev | ||
|
||
- name: Install project | ||
run: poetry install --no-interaction | ||
|
||
- name: tests | ||
run: | | ||
VALKEY_PRIMARY=$(tests/start_valkey.sh) | ||
VALKEY_SENTINEL=$(tests/start_valkey.sh --sentinel) | ||
CONTAINERS="$VALKEY_PRIMARY $VALKEY_SENTINEL" | ||
trap "docker stop $CONTAINERS && docker rm $CONTAINERS" EXIT | ||
tests/wait_for_valkey.sh $VALKEY_PRIMARY 6379 | ||
tests/wait_for_valkey.sh $VALKEY_SENTINEL 26379 | ||
tox | ||
pytest --ds=tests.settings.sqlite | ||
pytest --ds=tests.settings.sqlite_herd | ||
pytest --ds=tests.settings.sqlite_json | ||
pytest --ds=tests.settings.sqlite_lz4 | ||
pytest --ds=tests.settings.sqlite_msgpack | ||
pytest --ds=tests.settings.sqlite_sentinel | ||
pytest --ds=tests.settings.sqlite_sentinel_opts | ||
pytest --ds=tests.settings.sqlite_sharding | ||
pytest --ds=tests.settings.sqlite_usock | ||
pytest --ds=tests.settings.sqlite_zlib | ||
pytest --ds=tests.settings.sqlite_zstd | ||
pytest --ds=tests.settings.sqlite_gzip | ||
env: | ||
DJANGO: ${{ matrix.django-version }} | ||
VALKEY: ${{ matrix.valkey-version }} | ||
|
||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# This workflow will upload a Python Package using Twine when a release is created | ||
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python#publishing-to-package-registries | ||
|
||
# This workflow uses actions that are not certified by GitHub. | ||
# They are provided by a third-party and are governed by | ||
# separate terms of service, privacy policy, and support | ||
# documentation. | ||
|
||
name: Upload Python Package | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: build and publish | ||
uses: JRubics/[email protected] | ||
with: | ||
pypi_token: ${{ secrets.PYPI_API_TOKEN }} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
name: ruff | ||
on: [push, pull_request] | ||
jobs: | ||
ruff: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: chartboost/ruff-action@v1 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[tool.poetry] | ||
name = "django-valkey" | ||
version = "0.0.1" | ||
version = "0.0.9" | ||
license = "BSD-3-Caluse" | ||
description = "a valkey backend for django, forked from django-redis" | ||
authors = ["amirreza <[email protected]>"] | ||
|