Skip to content

Commit

Permalink
Add github actions & remove travis-ci config.
Browse files Browse the repository at this point in the history
The number of keys in testBigGetMulti is reduced because the larger number
doesn't work with memcached 1.6.12. For an unknown reason, get_multi()
with more than 2186 keys here returns nothing.
  • Loading branch information
asherf committed Dec 2, 2021
1 parent 4cda09a commit 2b9f983
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 44 deletions.
52 changes: 52 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: CI
on:
push:
branches:
- "*"
pull_request:
branches:
- master
jobs:
test:
timeout-minutes: 10
strategy:
fail-fast: false
matrix:
python-version: ["3.6", "3.7", "3.8", "3.9", "pypy3"]
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
name: "${{ matrix.os }} Python: ${{ matrix.python-version }}"
env:
LIBMEMCACHED_VERSION: '1.0.18'
services:
memcached:
image: memcached:1.6.12
ports:
- 11211:11211
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
pip install nose
sudo apt-get update -qq
sudo apt-get install libmemcached-dev
apt-cache show libmemcached-dev
- name: memcached stats
run: echo "stats settings" | netcat localhost 11211 -w 3
- name: Install package
run: python setup.py install
- name: Set LIBMEMCACHED_VERSION
run: echo LIBMEMCACHED_VERSION="$(python -c 'import pylibmc; print(pylibmc.libmemcached_version)')" >> $GITHUB_ENV
- name: Log versions
run: |
python --version
pip --version
echo "LIBMEMCACHED_VERSION=${LIBMEMCACHED_VERSION}"
- name: Run test
run: python bin/runtests.py -v tests --with-doctest
43 changes: 0 additions & 43 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion tests/test_cmemcached.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def testGetMulti(self):
eq_(result, {'a': 'valueA', 'b': 'valueB', 'c': 'valueC'})

def testBigGetMulti(self):
count = 10 ** 4
count = 10 ** 3
# Python 2: .encode() is a no-op on these byte strings since they
# only contain bytes that can be implicitly decoded as ASCII.
keys = ['key%d' % i for i in range(count)]
Expand Down

0 comments on commit 2b9f983

Please sign in to comment.