Skip to content

Commit f892a7f

Browse files
committed
Update ci workflows
1 parent 9fef84f commit f892a7f

File tree

3 files changed

+32
-29
lines changed

3 files changed

+32
-29
lines changed

.github/workflows/publish-to-pypi.yml

Lines changed: 29 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,12 @@ name: Publish Python 🐍 distribution 📦 to PyPI and TestPyPI
33
on: push
44

55
jobs:
6+
tests:
7+
uses: ./.github/workflows/tests.yml
68
build:
79
name: Build distribution 📦
810
runs-on: ubuntu-latest
11+
needs: tests
912

1013
steps:
1114
- uses: actions/checkout@v4
@@ -22,7 +25,7 @@ jobs:
2225
- name: Build a binary wheel and a source tarball
2326
run: python3 -m build
2427
- name: Store the distribution packages
25-
uses: actions/upload-artifact@v3
28+
uses: actions/upload-artifact@v4
2629
with:
2730
name: python-package-distributions
2831
path: dist/
@@ -42,7 +45,7 @@ jobs:
4245

4346
steps:
4447
- name: Download all the dists
45-
uses: actions/download-artifact@v3
48+
uses: actions/download-artifact@v4
4649
with:
4750
name: python-package-distributions
4851
path: dist/
@@ -63,7 +66,7 @@ jobs:
6366

6467
steps:
6568
- name: Download all the dists
66-
uses: actions/download-artifact@v3
69+
uses: actions/download-artifact@v4
6770
with:
6871
name: python-package-distributions
6972
path: dist/
@@ -92,26 +95,26 @@ jobs:
9295
'${{ github.ref_name }}' dist/**
9396
--repo '${{ github.repository }}'
9497
95-
publish-to-testpypi:
96-
name: Publish Python 🐍 distribution 📦 to TestPyPI
97-
needs:
98-
- build
99-
runs-on: ubuntu-latest
100-
101-
environment:
102-
name: testpypi
103-
url: https://test.pypi.org/p/certbot-nginx-unit
104-
105-
permissions:
106-
id-token: write
107-
108-
steps:
109-
- name: Download all the dists
110-
uses: actions/download-artifact@v3
111-
with:
112-
name: python-package-distributions
113-
path: dist/
114-
- name: Publish distribution 📦 to TestPyPI
115-
uses: pypa/gh-action-pypi-publish@release/v1
116-
with:
117-
repository-url: https://test.pypi.org/legacy/
98+
# publish-to-testpypi:
99+
# name: Publish Python 🐍 distribution 📦 to TestPyPI
100+
# needs:
101+
# - build
102+
# runs-on: ubuntu-latest
103+
#
104+
# environment:
105+
# name: testpypi
106+
# url: https://test.pypi.org/p/certbot-nginx-unit
107+
#
108+
# permissions:
109+
# id-token: write
110+
#
111+
# steps:
112+
# - name: Download all the dists
113+
# uses: actions/download-artifact@v4
114+
# with:
115+
# name: python-package-distributions
116+
# path: dist/
117+
# - name: Publish distribution 📦 to TestPyPI
118+
# uses: pypa/gh-action-pypi-publish@release/v1
119+
# with:
120+
# repository-url: https://test.pypi.org/legacy/

.github/workflows/tests.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
name: Tests
22

3-
on: [push]
3+
on: [workflow_call]
44

55
jobs:
66
build:
77

88
runs-on: ubuntu-latest
99
strategy:
1010
matrix:
11-
python: ["3.9", "3.10", "3.11"]
11+
python: ["3.9", "3.10", "3.11", "3.12"]
1212

1313
steps:
1414
- uses: actions/checkout@v4

certbot_nginx_unit/tests/configurator_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ def test_empty_configuration(self, unitc_mock):
128128
installer.deploy_cert("domain", "cert.pem", cert_file.name, "chain_path", cert_file.name)
129129

130130
expected_msg = "No '*:80' default listeners configured"
131-
self.assertEquals(str(ctx.exception), expected_msg)
131+
self.assertEqual(str(ctx.exception), expected_msg)
132132

133133
@mock.patch('certbot_nginx_unit.unitc')
134134
def test_only_80_listener_configuration(self, unitc_mock):

0 commit comments

Comments
 (0)