|
| 1 | +--- |
| 2 | + |
1 | 3 | name: Test Upload
|
2 | 4 |
|
3 |
| -on: |
4 |
| - pull_request: |
| 5 | +on: # yamllint disable-line rule:truthy |
5 | 6 | push:
|
| 7 | + pull_request: |
6 | 8 |
|
7 | 9 | jobs:
|
8 | 10 | test:
|
9 | 11 | runs-on: ubuntu-latest
|
| 12 | + |
10 | 13 | services:
|
11 | 14 | devpi:
|
12 | 15 | image: muccg/devpi
|
13 | 16 | env:
|
14 | 17 | DEVPI_PASSWORD: abcd1234
|
15 | 18 | ports:
|
16 |
| - - 3141 |
| 19 | + - 3141 |
| 20 | + |
17 | 21 | 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