set methods can now return a set or a lis, depending on user's choice #280
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
name: CI | |
on: [push, pull_request] | |
jobs: | |
populate-cache: | |
runs-on: ubuntu-latest | |
timeout-minutes: 60 | |
name: Update docker cache | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Cache docker images | |
id: custom-cache | |
uses: actions/cache@v4 | |
with: | |
path: ./custom-cache/ | |
key: custom-cache | |
- if: ${{ steps.custom-cache.outputs.cache-hit != 'true' || github.event_name == 'schedule' }} | |
name: Update cache | |
run: | | |
mkdir -p ./custom-cache/ | |
docker compose --profile all build | |
docker pull valkey/valkey:latest | |
docker save django-valkey-cluster:latest valkey/valkey:latest -o ./custom-cache/all.tar | |
test: | |
runs-on: ubuntu-latest | |
needs: [populate-cache] | |
timeout-minutes: 60 | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: | |
- '3.10' | |
- '3.11' | |
- '3.12' | |
# - '3.13' | |
django-version: | |
- '4.2' | |
- '5.0' | |
- '5.1' | |
env: | |
ACTIONS_ALLOW_UNSECURE_COMMANDS: true | |
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 docker images | |
id: custom-cache | |
uses: actions/cache@v4 | |
with: | |
path: ./custom-cache/ | |
fail-on-cache-miss: true | |
key: custom-cache | |
- name: Use Cache | |
run: docker image load -i ./custom-cache/all.tar | |
# - name: Cache | |
# id: cached-poetry | |
# uses: actions/cache@v4 | |
# with: | |
# path: ./.venv | |
# key: venv-${{ hashFiles('poetry.lock') }} | |
- name: Install poetry | |
if: steps.cached-poetry.outputs.cache-hit != 'true' | |
uses: abatilo/actions-poetry@v3 | |
- name: install dependencies | |
run: poetry install --no-interaction --no-root --all-extras --with dev | |
- name: config poetry | |
run: | | |
poetry config virtualenvs.create true --local | |
poetry config virtualenvs.in-project true --local | |
- name: Install project | |
run: | | |
poetry add django==${{ matrix.django-version }} | |
poetry install --no-interaction --all-extras | |
- name: tests | |
run: | | |
poetry run invoke devenv | |
chmod +x ./util/wait-for-it.sh | |
./util/wait-for-it.sh localhost:6379 | |
poetry run pytest tests/*.py --ds=tests.settings.sqlite -x | |
poetry run pytest tests/*.py --ds=tests.settings.sqlite_herd -x | |
poetry run pytest tests/*.py --ds=tests.settings.sqlite_json -x | |
poetry run pytest tests/*.py --ds=tests.settings.sqlite_lz4 -x | |
poetry run pytest tests/*.py --ds=tests.settings.sqlite_msgpack -x | |
poetry run pytest tests/*.py --ds=tests.settings.sqlite_sentinel -x | |
poetry run pytest tests/*.py --ds=tests.settings.sqlite_sentinel_opts -x | |
poetry run pytest tests/*.py --ds=tests.settings.sqlite_sharding -x | |
poetry run pytest tests/*.py --ds=tests.settings.sqlite_zlib -x | |
poetry run pytest tests/*.py --ds=tests.settings.sqlite_zstd -x | |
poetry run pytest tests/*.py --ds=tests.settings.sqlite_gzip -x | |
poetry run pytest tests/*.py --ds=tests.settings.sqlite_bz2 -x | |
poetry run pytest tests/tests_async/*.py --ds=tests.settings.sqlite_async -x | |
poetry run pytest tests/tests_async/*.py --ds=tests.settings.sqlite_async_herd -x | |
# poetry run pytest tests/*.py --ds=tests.settings.sqlite_usock -x | |
env: | |
DJANGO: ${{ matrix.django-version }} |