Skip to content

Commit

Permalink
Merge PR #111 into unstable/v1
Browse files Browse the repository at this point in the history
This patch adds a simple GHA-based smoke test that uses devpi to
verify the main success path of the action.
  • Loading branch information
webknjaz committed Dec 5, 2022
2 parents 5d1679f + 7ef975b commit f68ac3e
Showing 1 changed file with 45 additions and 0 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/test-upload.yml
@@ -0,0 +1,45 @@
name: Test Upload

on:
pull_request:
push:

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/

0 comments on commit f68ac3e

Please sign in to comment.