Skip to content

Commit

Permalink
add workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
methane committed Mar 8, 2024
1 parent dcc23cc commit 5193189
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 3 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
on:
- pull_request
- push

name: build

jobs:
test:
runs-on: ubuntu-latest
services:
memcached:
image: memcached
ports:
- 11211/tcp
options: --health-cmd "timeout 5 bash -c 'cat < /dev/null > /dev/tcp/127.0.0.1/11211'" --health-interval 10s --health-timeout 5s --health-retries 5

steps:
- uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.8"
cache: 'pip'
cache-dependency-path: 'requirements-dev.lock'

- name: Prepare
run: |
pip install -r requirements-dev.lock
- name: run test
run: |
pytest -v .
6 changes: 5 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ authors = [
dependencies = [
"Flask",
"pymemcache>=1.3.4",
"six",
]
dev-dependencies = [
"pytest",
Expand All @@ -23,6 +22,11 @@ dev-dependencies = [
[project.urls]
Homepage = "https://github.com/KLab/Flask-PyMemcache"

[tool]
rye = { dev-dependencies = [
"pytest>=8.0.2",
] }

[tool.hatch.build.targets.sdist]
include = [
"/flask_pymemcache",
Expand Down
4 changes: 2 additions & 2 deletions test_flask_pymemcache.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@

import pymemcache.client
import flask
import flask.ext.pymemcache
import flask_pymemcache


class TestFlaskPyMemcache(TestCase):
def test_simple(self):
pymc = pymemcache.client.Client(('localhost', 11211))
memcache = flask.ext.pymemcache.FlaskPyMemcache()
memcache = flask_pymemcache.FlaskPyMemcache()
app = flask.Flask(__name__)
app.config['PYMEMCACHE'] = {
'server': ('localhost', 11211),
Expand Down

0 comments on commit 5193189

Please sign in to comment.