1818
1919jobs :
2020 ruff-format :
21- runs-on : " ubuntu-24.04 "
21+ runs-on : " ubuntu-latest "
2222 env :
2323 INVOKE_NETUTILS_LOCAL : " True"
2424 steps :
@@ -27,11 +27,11 @@ jobs:
2727 - name : " Setup environment"
2828 uses : " networktocode/gh-action-setup-poetry-environment@v6"
2929 with :
30- poetry-version : " 1.8.5 "
30+ poetry-version : " 2.1.3 "
3131 - name : " Linting: ruff format"
3232 run : " poetry run invoke ruff --action format"
3333 ruff-lint :
34- runs-on : " ubuntu-24.04 "
34+ runs-on : " ubuntu-latest "
3535 env :
3636 INVOKE_NETUTILS_LOCAL : " True"
3737 steps :
@@ -40,11 +40,11 @@ jobs:
4040 - name : " Setup environment"
4141 uses : " networktocode/gh-action-setup-poetry-environment@v6"
4242 with :
43- poetry-version : " 1.8.5 "
43+ poetry-version : " 2.1.3 "
4444 - name : " Linting: ruff"
4545 run : " poetry run invoke ruff --action lint"
4646 mypy :
47- runs-on : " ubuntu-24.04 "
47+ runs-on : " ubuntu-latest "
4848 env :
4949 INVOKE_NETUTILS_LOCAL : " True"
5050 steps :
6060 - " ruff-format"
6161 - " ruff-lint"
6262 check-docs-build :
63- runs-on : " ubuntu-24.04 "
63+ runs-on : " ubuntu-latest "
6464 env :
6565 INVOKE_NETUTILS_LOCAL : " True"
6666 steps :
@@ -69,11 +69,12 @@ jobs:
6969 - name : " Setup environment"
7070 uses : " networktocode/gh-action-setup-poetry-environment@v6"
7171 with :
72- poetry-version : " 1.8.5"
72+ poetry-version : " 2.1.3"
73+ poetry-install-options : " --only dev,docs"
7374 - name : " Check Docs Build"
7475 run : " poetry run invoke build-and-check-docs"
7576 poetry :
76- runs-on : " ubuntu-24.04 "
77+ runs-on : " ubuntu-latest "
7778 env :
7879 INVOKE_NETUTILS_LOCAL : " True"
7980 steps :
@@ -82,16 +83,15 @@ jobs:
8283 - name : " Setup environment"
8384 uses : " networktocode/gh-action-setup-poetry-environment@v6"
8485 with :
85- poetry-version : " 1.8.5 "
86+ poetry-version : " 2.1.3 "
8687 - name : " Checking: poetry lock file"
87- run : " poetry lock --check"
88+ run : " poetry run invoke lock --check"
8889 needs :
8990 - " ruff-format"
9091 - " ruff-lint"
91- - " mypy"
9292 - " yamllint"
9393 yamllint :
94- runs-on : " ubuntu-24.04 "
94+ runs-on : " ubuntu-latest "
9595 env :
9696 INVOKE_NETUTILS_LOCAL : " True"
9797 steps :
@@ -100,14 +100,14 @@ jobs:
100100 - name : " Setup environment"
101101 uses : " networktocode/gh-action-setup-poetry-environment@v6"
102102 with :
103- poetry-version : " 1.8.5 "
103+ poetry-version : " 2.1.3 "
104104 - name : " Linting: yamllint"
105105 run : " poetry run invoke yamllint"
106106 needs :
107107 - " ruff-format"
108108 - " ruff-lint"
109109 pylint :
110- runs-on : " ubuntu-24.04 "
110+ runs-on : " ubuntu-latest "
111111 strategy :
112112 fail-fast : true
113113 matrix :
@@ -120,7 +120,7 @@ jobs:
120120 - name : " Setup environment"
121121 uses : " networktocode/gh-action-setup-poetry-environment@v6"
122122 with :
123- poetry-version : " 1.8.5 "
123+ poetry-version : " 2.1.3 "
124124 - name : " Get image version"
125125 run : " echo INVOKE_NETUTILS_IMAGE_VER=`poetry version -s`-py${{ matrix.python-version }} >> $GITHUB_ENV"
126126 - name : " Set up Docker Buildx"
@@ -139,8 +139,6 @@ jobs:
139139 cache-to : " type=gha,scope=${{ env.INVOKE_NETUTILS_IMAGE_NAME }}-${{ env.INVOKE_NETUTILS_IMAGE_VER }}-py${{ matrix.python-version }}"
140140 build-args : |
141141 PYTHON_VER=${{ env.PYTHON_VER }}
142- - name : " Debug: Show docker images"
143- run : " docker image ls"
144142 - name : " Linting: Pylint"
145143 run : " poetry run invoke pylint"
146144 needs :
@@ -150,7 +148,7 @@ jobs:
150148 fail-fast : true
151149 matrix :
152150 python-version : ["3.9", "3.10", "3.11", "3.12", "3.13"]
153- runs-on : " ubuntu-24.04 "
151+ runs-on : " ubuntu-latest "
154152 env :
155153 PYTHON_VER : " ${{ matrix.python-version }}"
156154 steps :
@@ -159,7 +157,7 @@ jobs:
159157 - name : " Setup environment"
160158 uses : " networktocode/gh-action-setup-poetry-environment@v6"
161159 with :
162- poetry-version : " 1.8.5 "
160+ poetry-version : " 2.1.3 "
163161 - name : " Get image version"
164162 run : " echo INVOKE_NETUTILS_IMAGE_VER=`poetry version -s`-py${{ matrix.python-version }} >> $GITHUB_ENV"
165163 - name : " Set up Docker Buildx"
@@ -178,15 +176,31 @@ jobs:
178176 cache-to : " type=gha,scope=${{ env.INVOKE_NETUTILS_IMAGE_NAME }}-${{ env.INVOKE_NETUTILS_IMAGE_VER }}-py${{ matrix.python-version }}"
179177 build-args : |
180178 PYTHON_VER=${{ env.PYTHON_VER }}
181- - name : " Debug: Show docker images"
182- run : " docker image ls"
183179 - name : " Run Tests"
184180 run : " poetry run invoke pytest"
185181 needs :
186- - " pylint"
182+ - " poetry"
183+ changelog :
184+ if : >
185+ contains(fromJson('["develop"]'), github.base_ref) &&
186+ (github.head_ref != 'main') && (!startsWith(github.head_ref, 'release'))
187+ runs-on : " ubuntu-latest"
188+ steps :
189+ - name : " Check out repository code"
190+ uses : " actions/checkout@v4"
191+ with :
192+ fetch-depth : " 0"
193+ - name : " Setup environment"
194+ uses : " networktocode/gh-action-setup-poetry-environment@v6"
195+ with :
196+ poetry-version : " 2.1.3"
197+ - name : " Check for changelog entry"
198+ run : |
199+ git fetch --no-tags origin +refs/heads/${{ github.base_ref }}:refs/remotes/origin/${{ github.base_ref }}
200+ poetry run towncrier check --compare-with origin/${{ github.base_ref }}
187201 publish_gh :
188202 name : " Publish to GitHub"
189- runs-on : " ubuntu-24.04 "
203+ runs-on : " ubuntu-latest "
190204 # yamllint disable-line rule:quoted-strings
191205 if : startsWith(github.ref, 'refs/tags/v')
192206 env :
@@ -197,13 +211,15 @@ jobs:
197211 - name : " Setup environment"
198212 uses : " networktocode/gh-action-setup-poetry-environment@v6"
199213 with :
200- poetry-version : " 1.8.5 "
214+ poetry-version : " 2.1.3 "
201215 python-version : " 3.12"
202216 poetry-install-options : " --no-root"
203217 - name : " Set env"
204218 run : " echo RELEASE_VERSION=${GITHUB_REF:10} >> $GITHUB_ENV"
205219 - name : " Run Poetry Version"
206220 run : " poetry version $RELEASE_VERSION"
221+ - name : " Build Documentation"
222+ run : " poetry run invoke build-and-check-docs"
207223 - name : " Run Poetry Build"
208224 run : " poetry build"
209225 - name : " Upload binaries to release"
@@ -214,25 +230,30 @@ jobs:
214230 - " pytest"
215231 publish_pypi :
216232 name : " Push Package to PyPI"
217- runs-on : " ubuntu-24.04"
218- if : " startsWith(github.ref, 'refs/tags/v')"
233+ runs-on : " ubuntu-latest"
234+ # yamllint disable-line rule:quoted-strings
235+ if : startsWith(github.ref, 'refs/tags/v')
236+ env :
237+ INVOKE_NETUTILS_LOCAL : " True"
219238 steps :
220239 - name : " Check out repository code"
221240 uses : " actions/checkout@v4"
222- - name : " Set up Python "
223- uses : " actions/ setup-python@v2 "
241+ - name : " Setup environment "
242+ uses : " networktocode/gh-action- setup-poetry-environment@v6 "
224243 with :
225- python-version : " 3.13"
226- - name : " Install Python Packages"
227- run : " pip install poetry"
244+ poetry-version : " 2.1.3"
228245 - name : " Set env"
229246 run : " echo RELEASE_VERSION=${GITHUB_REF:10} >> $GITHUB_ENV"
230247 - name : " Run Poetry Version"
231248 run : " poetry version $RELEASE_VERSION"
249+ - name : " Install Dependencies (needed for mkdocs)"
250+ run : " poetry install --no-root"
251+ - name : " Build Documentation"
252+ run : " poetry run invoke build-and-check-docs"
232253 - name : " Run Poetry Build"
233254 run : " poetry build"
234255 - name : " Push to PyPI"
235- uses : " pypa/gh-action-pypi-publish@release/v1 "
256+ uses : " pypa/gh-action-pypi-publish@76f52bc884231f62b9a034ebfe128415bbaabdfc " # v1.12.4
236257 with :
237258 user : " __token__"
238259 password : " ${{ secrets.PYPI_API_TOKEN }}"
@@ -242,7 +263,7 @@ jobs:
242263 needs :
243264 - " publish_gh"
244265 - " publish_pypi"
245- runs-on : " ubuntu-24.04 "
266+ runs-on : " ubuntu-latest "
246267 env :
247268 SLACK_WEBHOOK_URL : " ${{ secrets.SLACK_WEBHOOK_URL }}"
248269 SLACK_MESSAGE : >-
0 commit comments