Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add test upload workflow #111

Merged
merged 2 commits into from Dec 5, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
43 changes: 43 additions & 0 deletions .github/workflows/test-upload.yml
@@ -0,0 +1,43 @@
name: Test Upload

on: push
webknjaz marked this conversation as resolved.
Show resolved Hide resolved

jobs:
test:
runs-on: ubuntu-latest
services:
devpi:
image: muccg/devpi
env:
DEVPI_PASSWORD: abcd1234
ports:
- 3141
steps:
- run: python3 -m pip install --upgrade pip build twine
- run: mkdir -p src/test_package
- run: echo '__version__ = "0.1"' > src/test_package/__init__.py
- run: echo "# Test Package" > README.md
- run: echo "$CONTENTS" > pyproject.toml
env:
CONTENTS: |
[build-system]
requires = ["setuptools>=61", "wheel"]
build-backend = "setuptools.build_meta"
[project]
name = "test-package"
version = "0.1"
readme = "README.md"
- run: python3 -m build
- run: twine register dist/*.tar.gz
env:
TWINE_USERNAME: root
TWINE_PASSWORD: abcd1234
TWINE_REPOSITORY_URL: http://localhost:${{ job.services.devpi.ports['3141'] }}/root/public/
- uses: actions/checkout@v3
with:
path: test
- uses: ./test
with:
user: root
password: abcd1234
repository_url: http://devpi:3141/root/public/