Skip to content

Commit cde4774

Browse files
committed
Adjust the GHA workflow per yamllint rules
1 parent a737e68 commit cde4774

File tree

1 file changed

+38
-31
lines changed

1 file changed

+38
-31
lines changed

.github/workflows/test-upload.yml

Lines changed: 38 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,52 @@
1+
---
2+
13
name: Test Upload
24

3-
on:
4-
pull_request:
5+
on: # yamllint disable-line rule:truthy
56
push:
7+
pull_request:
68

79
jobs:
810
test:
911
runs-on: ubuntu-latest
12+
1013
services:
1114
devpi:
1215
image: muccg/devpi
1316
env:
1417
DEVPI_PASSWORD: abcd1234
1518
ports:
16-
- 3141
19+
- 3141
20+
1721
steps:
18-
- run: python3 -m pip install --upgrade pip build twine
19-
- run: mkdir -p src/test_package
20-
- run: echo '__version__ = "0.1"' > src/test_package/__init__.py
21-
- run: echo "# Test Package" > README.md
22-
- run: echo "$CONTENTS" > pyproject.toml
23-
env:
24-
CONTENTS: |
25-
[build-system]
26-
requires = ["setuptools>=61", "wheel"]
27-
build-backend = "setuptools.build_meta"
28-
[project]
29-
name = "test-package"
30-
version = "0.1"
31-
readme = "README.md"
32-
- run: python3 -m build
33-
- run: twine register dist/*.tar.gz
34-
env:
35-
TWINE_USERNAME: root
36-
TWINE_PASSWORD: abcd1234
37-
TWINE_REPOSITORY_URL: http://localhost:${{ job.services.devpi.ports['3141'] }}/root/public/
38-
- uses: actions/checkout@v3
39-
with:
40-
path: test
41-
- uses: ./test
42-
with:
43-
user: root
44-
password: abcd1234
45-
repository_url: http://devpi:3141/root/public/
22+
- run: python3 -m pip install --upgrade pip build twine
23+
- run: mkdir -p src/test_package
24+
- run: echo '__version__ = "0.1"' > src/test_package/__init__.py
25+
- run: echo "# Test Package" > README.md
26+
- run: echo "$CONTENTS" > pyproject.toml
27+
env:
28+
CONTENTS: |
29+
[build-system]
30+
requires = ["setuptools>=61", "wheel"]
31+
build-backend = "setuptools.build_meta"
32+
[project]
33+
name = "test-package"
34+
version = "0.1"
35+
readme = "README.md"
36+
- run: python3 -m build
37+
- run: twine register dist/*.tar.gz
38+
env:
39+
TWINE_USERNAME: root
40+
TWINE_PASSWORD: abcd1234
41+
TWINE_REPOSITORY_URL: >-
42+
http://localhost:${{ job.services.devpi.ports['3141'] }}/root/public/
43+
- uses: actions/checkout@v3
44+
with:
45+
path: test
46+
- uses: ./test
47+
with:
48+
user: root
49+
password: abcd1234
50+
repository_url: http://devpi:3141/root/public/
51+
52+
...

0 commit comments

Comments
 (0)