pypi-publish/.github/workflows/self-smoke-test-action.yml

71 lines
1.7 KiB
YAML
Raw Normal View History

---
2022-12-06 16:06:05 -05:00
name: 🧪
2022-12-05 17:01:24 -05:00
on: # yamllint disable-line rule:truthy
2022-12-05 17:33:07 -05:00
push:
pull_request:
2022-12-05 17:01:24 -05:00
env:
FORCE_COLOR: 1 # Request colored output from CLI tools supporting it
MYPY_FORCE_COLOR: 1 # MyPy's color enforcement
PIP_DISABLE_PIP_VERSION_CHECK: 1
PIP_NO_PYTHON_VERSION_WARNING: 1
PIP_NO_WARN_SCRIPT_LOCATION: 1
PY_COLORS: 1 # Recognized by the `py` package, dependency of `pytest`
TOX_PARALLEL_NO_SPINNER: 1
TOX_TESTENV_PASSENV: >- # Make tox-wrapped tools see color requests
FORCE_COLOR
MYPY_FORCE_COLOR
NO_COLOR
PY_COLORS
PYTEST_THEME
PYTEST_THEME_MODE
2022-12-05 17:01:24 -05:00
jobs:
2022-12-06 16:06:28 -05:00
smoke-test:
2022-12-05 17:01:24 -05:00
runs-on: ubuntu-latest
2022-12-05 17:01:24 -05:00
services:
devpi:
image: muccg/devpi
env:
DEVPI_PASSWORD: abcd1234
ports:
- 3141
timeout-minutes: 2
2022-12-05 17:01:24 -05:00
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/
...