Skip to content

Commit 9022aae

Browse files
Add test upload workflow
1 parent 5d1679f commit 9022aae

File tree

1 file changed

+43
-0
lines changed

1 file changed

+43
-0
lines changed

.github/workflows/test-upload.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Test Upload
2+
3+
on: push
4+
5+
jobs:
6+
test:
7+
runs-on: ubuntu-latest
8+
services:
9+
devpi:
10+
image: muccg/devpi
11+
env:
12+
DEVPI_PASSWORD: abcd1234
13+
ports:
14+
- 3141
15+
steps:
16+
- run: python3 -m pip install --upgrade pip build twine
17+
- run: mkdir -p src/test_package
18+
- run: echo '__version__ = "0.1"' > src/test_package/__init__.py
19+
- run: echo "# Test Package" > README.md
20+
- run: echo "$CONTENTS" > pyproject.toml
21+
env:
22+
CONTENTS: |
23+
[build-system]
24+
requires = ["setuptools>=61", "wheel"]
25+
build-backend = "setuptools.build_meta"
26+
[project]
27+
name = "test-package"
28+
version = "0.1"
29+
readme = "README.md"
30+
- run: python3 -m build
31+
- run: twine register dist/*.tar.gz
32+
env:
33+
TWINE_USERNAME: root
34+
TWINE_PASSWORD: abcd1234
35+
TWINE_REPOSITORY_URL: http://localhost:${{ job.services.devpi.ports['3141'] }}/root/public/
36+
- uses: actions/checkout@v3
37+
with:
38+
path: test
39+
- uses: ./test
40+
with:
41+
user: root
42+
password: abcd1234
43+
repository_url: http://devpi:3141/root/public/

0 commit comments

Comments
 (0)