Adjust the GHA workflow per yamllint rules
This commit is contained in:
parent
a737e68aed
commit
cde4774fb1
|
@ -1,45 +1,52 @@
|
||||||
|
---
|
||||||
|
|
||||||
name: Test Upload
|
name: Test Upload
|
||||||
|
|
||||||
on:
|
on: # yamllint disable-line rule:truthy
|
||||||
pull_request:
|
|
||||||
push:
|
push:
|
||||||
|
pull_request:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
test:
|
test:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
services:
|
services:
|
||||||
devpi:
|
devpi:
|
||||||
image: muccg/devpi
|
image: muccg/devpi
|
||||||
env:
|
env:
|
||||||
DEVPI_PASSWORD: abcd1234
|
DEVPI_PASSWORD: abcd1234
|
||||||
ports:
|
ports:
|
||||||
- 3141
|
- 3141
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- run: python3 -m pip install --upgrade pip build twine
|
- run: python3 -m pip install --upgrade pip build twine
|
||||||
- run: mkdir -p src/test_package
|
- run: mkdir -p src/test_package
|
||||||
- run: echo '__version__ = "0.1"' > src/test_package/__init__.py
|
- run: echo '__version__ = "0.1"' > src/test_package/__init__.py
|
||||||
- run: echo "# Test Package" > README.md
|
- run: echo "# Test Package" > README.md
|
||||||
- run: echo "$CONTENTS" > pyproject.toml
|
- run: echo "$CONTENTS" > pyproject.toml
|
||||||
env:
|
env:
|
||||||
CONTENTS: |
|
CONTENTS: |
|
||||||
[build-system]
|
[build-system]
|
||||||
requires = ["setuptools>=61", "wheel"]
|
requires = ["setuptools>=61", "wheel"]
|
||||||
build-backend = "setuptools.build_meta"
|
build-backend = "setuptools.build_meta"
|
||||||
[project]
|
[project]
|
||||||
name = "test-package"
|
name = "test-package"
|
||||||
version = "0.1"
|
version = "0.1"
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
- run: python3 -m build
|
- run: python3 -m build
|
||||||
- run: twine register dist/*.tar.gz
|
- run: twine register dist/*.tar.gz
|
||||||
env:
|
env:
|
||||||
TWINE_USERNAME: root
|
TWINE_USERNAME: root
|
||||||
TWINE_PASSWORD: abcd1234
|
TWINE_PASSWORD: abcd1234
|
||||||
TWINE_REPOSITORY_URL: http://localhost:${{ job.services.devpi.ports['3141'] }}/root/public/
|
TWINE_REPOSITORY_URL: >-
|
||||||
- uses: actions/checkout@v3
|
http://localhost:${{ job.services.devpi.ports['3141'] }}/root/public/
|
||||||
with:
|
- uses: actions/checkout@v3
|
||||||
path: test
|
with:
|
||||||
- uses: ./test
|
path: test
|
||||||
with:
|
- uses: ./test
|
||||||
user: root
|
with:
|
||||||
password: abcd1234
|
user: root
|
||||||
repository_url: http://devpi:3141/root/public/
|
password: abcd1234
|
||||||
|
repository_url: http://devpi:3141/root/public/
|
||||||
|
|
||||||
|
...
|
||||||
|
|
Loading…
Reference in New Issue