Skip to content

Commit a88aa94

Browse files
committed
Add GitHub Actions workflow for publishing package to PyPI and fix Redis port configuration in tests
1 parent 6c60138 commit a88aa94

2 files changed

Lines changed: 34 additions & 1 deletion

File tree

.github/workflows/pypi.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Publish package to PyPI
2+
3+
on:
4+
release:
5+
types: [published]
6+
workflow_dispatch:
7+
8+
permissions:
9+
contents: read
10+
id-token: write
11+
12+
jobs:
13+
publish:
14+
name: Build and publish
15+
runs-on: ubuntu-latest
16+
environment: release
17+
18+
steps:
19+
- name: Checkout
20+
uses: actions/checkout@v4
21+
22+
- name: Set up Python
23+
uses: actions/setup-python@v5
24+
with:
25+
python-version: "3.12"
26+
27+
- name: Build distributions
28+
run: |
29+
python -m pip install --upgrade pip build
30+
python -m build
31+
32+
- name: Publish to PyPI
33+
uses: pypa/gh-action-pypi-publish@release/v1

.github/workflows/tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
redis:
1919
image: redis:7-alpine
2020
ports:
21-
- 6380:6379
21+
- 6379:6379
2222
options: >-
2323
--health-cmd "redis-cli ping"
2424
--health-interval 5s

0 commit comments

Comments
 (0)