@@ -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