Skip to content

Commit 8f65ad3

Browse files
committed
test workflow
1 parent 81591c9 commit 8f65ad3

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed

.github/workflows/test.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Publish to Test PyPI
2+
3+
on:
4+
push:
5+
branches:
6+
- 'feature*'
7+
8+
jobs:
9+
test-and-publish:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Checkout code
14+
uses: actions/checkout@v4
15+
16+
- name: Set up Python
17+
uses: actions/setup-python@v5
18+
with:
19+
python-version: '3.12'
20+
21+
- name: Install Poetry
22+
run: |
23+
curl -sSL https://install.python-poetry.org | python3 -
24+
echo "$HOME/.local/bin" >> $GITHUB_PATH
25+
26+
- name: Install dependencies
27+
run: poetry install
28+
29+
- name: Run tests
30+
run: poetry run pytest
31+
32+
- name: Build the package
33+
run: poetry build
34+
35+
- name: Publish to Test PyPI
36+
env:
37+
POETRY_PYPI_TOKEN_TESTPYPI: ${{ secrets.TEST_PYPI_TOKEN }}
38+
run: |
39+
poetry config repositories.testpypi https://test.pypi.org/legacy/
40+
poetry publish -r testpypi --build

0 commit comments

Comments
 (0)