Skip to content

Commit 4f3a625

Browse files
committed
Add extensive test coverage
1 parent 43ec50f commit 4f3a625

25 files changed

+2469
-426
lines changed

.devcontainer/redis.conf

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,5 +106,4 @@ rdb-save-incremental-fsync yes
106106
# tls-ca-cert-file ca.crt
107107

108108
# Development optimizations
109-
tcp-nodelay yes
110109
rdbcompression yes

.gitattributes

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# Set default behavior to automatically normalize line endings
2+
* text=auto eol=lf
3+
4+
# Explicitly declare text files you want to always be normalized and converted to LF
5+
*.py text eol=lf
6+
*.md text eol=lf
7+
*.yml text eol=lf
8+
*.yaml text eol=lf
9+
*.json text eol=lf
10+
*.txt text eol=lf
11+
*.conf text eol=lf
12+
*.toml text eol=lf
13+
*.sh text eol=lf
14+
*.dockerfile text eol=lf
15+
Dockerfile text eol=lf
16+
Makefile text eol=lf
17+
18+
# Declare files that will always have CRLF line endings on checkout (if any)
19+
# *.bat text eol=crlf
20+
21+
# Denote all files that are truly binary and should not be modified
22+
*.png binary
23+
*.jpg binary
24+
*.jpeg binary
25+
*.gif binary
26+
*.ico binary
27+
*.woff binary
28+
*.woff2 binary
29+
*.ttf binary
30+
*.eot binary

.github/workflows/manual-release.yml

Lines changed: 9 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -44,18 +44,19 @@ jobs:
4444
fetch-depth: 0
4545

4646
- name: Set up Python
47-
uses: actions/setup-python@v4
47+
uses: actions/setup-python@v5
4848
with:
4949
python-version: '3.11'
5050

51-
- name: Install dependencies
51+
- name: Install build & dev dependencies
5252
run: |
5353
python -m pip install --upgrade pip
54+
pip install -e .[dev]
5455
pip install build twine
5556
5657
- name: Verify version matches
5758
run: |
58-
PACKAGE_VERSION=$(python -c "from src.yokedcache import __version__; print(__version__)")
59+
PACKAGE_VERSION=$(python -c "import yokedcache; print(yokedcache.__version__)")
5960
if [ "$PACKAGE_VERSION" != "${{ github.event.inputs.version }}" ]; then
6061
echo "Package version ($PACKAGE_VERSION) doesn't match input version (${{ github.event.inputs.version }})"
6162
echo "Please update src/yokedcache/__init__.py to version ${{ github.event.inputs.version }}"
@@ -102,15 +103,12 @@ jobs:
102103
f.write(f"Manual release {version}")
103104
EOF
104105
105-
- name: Build package
106-
run: |
107-
python -m build
108-
109106
- name: Run tests
110107
run: |
111-
pip install -e .
112-
pip install pytest pytest-cov pytest-asyncio
113-
python -m pytest tests/ --tb=short
108+
pytest -q --disable-warnings
109+
110+
- name: Build package
111+
run: python -m build
114112

115113
- name: Create GitHub Release
116114
uses: softprops/action-gh-release@v1
@@ -123,9 +121,5 @@ jobs:
123121
dist/*.tar.gz
124122
draft: ${{ github.event.inputs.draft }}
125123
prerelease: ${{ contains(github.event.inputs.version, 'rc') || contains(github.event.inputs.version, 'beta') || contains(github.event.inputs.version, 'alpha') }}
124+
# Publication to PyPI is performed by publish.yml upon release publication to avoid duplication.
126125

127-
- name: Publish to PyPI
128-
if: github.event.inputs.draft == 'false'
129-
uses: pypa/gh-action-pypi-publish@release/v1
130-
with:
131-
print-hash: true

0 commit comments

Comments
 (0)