Skip to content

Commit 3dadcc4

Browse files
committed
Update files based on the repo-config 0.10.0 templates
Signed-off-by: Leandro Lucarella <[email protected]>
1 parent 8a7adce commit 3dadcc4

File tree

4 files changed

+49
-8
lines changed

4 files changed

+49
-8
lines changed

.github/containers/test-installation/Dockerfile

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,8 @@ RUN apt-get update -y && \
1313
python -m pip install --upgrade --no-cache-dir pip
1414

1515
COPY dist dist
16-
RUN pip install dist/*.whl && \
17-
rm -rf dist
16+
# This git-credentials file is made available by the GitHub ci.yaml workflow
17+
COPY git-credentials /root/.git-credentials
18+
RUN git config --global credential.helper store && \
19+
pip install dist/*.whl && \
20+
rm -rf dist /root/.git-credentials

.github/workflows/ci.yaml

Lines changed: 37 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,9 @@ jobs:
4141
runs-on: ${{ matrix.os }}
4242

4343
steps:
44+
- name: Setup Git
45+
uses: frequenz-floss/[email protected]
46+
4447
- name: Print environment (debug)
4548
run: env
4649

@@ -88,10 +91,14 @@ jobs:
8891
# The job name should match the name of the `nox` job.
8992
name: Test with nox
9093
needs: ["nox"]
94+
# We skip this job only if nox was also skipped
95+
if: always() && needs.nox.result != 'skipped'
9196
runs-on: ubuntu-20.04
97+
env:
98+
DEPS_RESULT: ${{ needs.nox.result }}
9299
steps:
93-
- name: Return true
94-
run: "true"
100+
- name: Check matrix job result
101+
run: test "$DEPS_RESULT" = "success"
95102

96103
nox-cross-arch:
97104
name: Cross-arch tests with nox
@@ -115,6 +122,9 @@ jobs:
115122
runs-on: ${{ matrix.os }}
116123

117124
steps:
125+
- name: Setup Git
126+
uses: frequenz-floss/[email protected]
127+
118128
- name: Fetch sources
119129
uses: actions/checkout@v4
120130
with:
@@ -161,7 +171,7 @@ jobs:
161171
uses: actions/cache@v4
162172
with:
163173
path: /tmp/pip-cache
164-
key: nox-${{ matrix.nox-session }}-${{ matrix.arch }}-${{ matrix.os }}-${{ matrix.python }}-${{ hashFiles('**/pyproject.toml') }}
174+
key: nox-${{ matrix.nox-session }}-${{ matrix.arch }}-${{ matrix.os }}-${{ matrix.python }}-${{ hashFiles('pyproject.toml') }}
165175

166176
# This ensures that the docker container has access to the pip cache.
167177
# Changing the user in the docker-run step causes it to fail due to
@@ -202,15 +212,22 @@ jobs:
202212
# The job name should match the name of the `nox-cross-arch` job.
203213
name: Cross-arch tests with nox
204214
needs: ["nox-cross-arch"]
215+
# We skip this job only if nox-cross-arch was also skipped
216+
if: always() && needs.nox-cross-arch.result != 'skipped'
205217
runs-on: ubuntu-20.04
218+
env:
219+
DEPS_RESULT: ${{ needs.nox-cross-arch.result }}
206220
steps:
207-
- name: Return true
208-
run: "true"
221+
- name: Check matrix job result
222+
run: test "$DEPS_RESULT" = "success"
209223

210224
build:
211225
name: Build distribution packages
212226
runs-on: ubuntu-20.04
213227
steps:
228+
- name: Setup Git
229+
uses: frequenz-floss/[email protected]
230+
214231
- name: Fetch sources
215232
uses: actions/checkout@v4
216233
with:
@@ -245,15 +262,24 @@ jobs:
245262
steps:
246263
- name: Fetch sources
247264
uses: actions/checkout@v4
265+
248266
- name: Download package
249267
uses: actions/download-artifact@v4
250268
with:
251269
name: dist-packages
252270
path: dist
271+
272+
- name: Make Git credentials available to docker
273+
run: |
274+
touch ~/.git-credentials # Ensure the file exists
275+
cp ~/.git-credentials git-credentials || true
276+
253277
- name: Set up QEMU
254278
uses: docker/setup-qemu-action@v3
279+
255280
- name: Set up docker-buildx
256281
uses: docker/setup-buildx-action@v3
282+
257283
- name: Test Installation
258284
uses: docker/build-push-action@v6
259285
with:
@@ -431,6 +457,12 @@ jobs:
431457
# https://blog.pypi.org/posts/2023-04-20-introducing-trusted-publishers/
432458
id-token: write
433459
steps:
460+
- name: Setup Git
461+
uses: frequenz-floss/[email protected]
462+
463+
- name: Fetch sources
464+
uses: actions/checkout@v4
465+
434466
- name: Download distribution files
435467
uses: actions/download-artifact@v4
436468
with:

mkdocs.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ plugins:
9393
- literate-nav:
9494
nav_file: SUMMARY.md
9595
- mike:
96-
alias_type: redirect
96+
alias_type: symlink
9797
canonical_version: latest
9898
- mkdocstrings:
9999
default_handler: python
@@ -111,6 +111,7 @@ plugins:
111111
show_signature_annotations: true
112112
show_source: true
113113
show_symbol_type_toc: true
114+
show_symbol_type_toc: true
114115
signature_crossrefs: true
115116
import:
116117
# See https://mkdocstrings.github.io/python/usage/#import for details

pyproject.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ dev-mkdocs = [
6363
"mkdocs-macros-plugin == 1.0.5",
6464
"mkdocs-material == 9.5.33",
6565
"mkdocstrings[python] == 0.25.2",
66+
"mkdocstrings-python == 1.9.2",
6667
"frequenz-repo-config[lib] == 0.10.0",
6768
]
6869
dev-mypy = [
@@ -138,8 +139,12 @@ disable = [
138139
# pylint's unsubscriptable check is buggy and is not needed because
139140
# it is a type-check, for which we already have mypy.
140141
"unsubscriptable-object",
142+
# Checked by mypy
143+
"no-member",
141144
# Checked by flake8
145+
"f-string-without-interpolation",
142146
"line-too-long",
147+
"missing-function-docstring",
143148
"redefined-outer-name",
144149
"unnecessary-lambda-assignment",
145150
"unused-import",

0 commit comments

Comments
 (0)