Skip to content

Commit 4233bc8

Browse files
authored
Use new split workflow Ubuntu 24.04 in workflows (frequenz-floss#369)
These new workflows also start using a new reusable `gh-action-nox`, native arm runners and Ubuntu 24.04, as [Ubuntu 20.04 will be removed from GitHub runners by April's 1st](https://github.blog/changelog/2025-01-15-github-actions-ubuntu-20-runner-image-brownout-dates-and-other-breaking-changes/ ). Python 3.12 is also added to the test matrix. The PR action is more lightweight, and only tests with one matrix (the most widely used), so PRs can be tested more quickly. The push workflow does a more intense testing with all matrix combinations. This also runs for the merge queue, so before PRs are actually merged the tests will run for the complete matrix. Fixes frequenz-floss#342, frequenz-floss#341. Improves frequenz-floss#59.
2 parents 54fcfa8 + 8d12db0 commit 4233bc8

File tree

22 files changed

+2127
-1661
lines changed

22 files changed

+2127
-1661
lines changed

.github/workflows/ci-pr.yaml

+55
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: Test PR
2+
3+
on:
4+
pull_request:
5+
6+
env:
7+
# Please make sure this version is included in the `matrix`, as the
8+
# `matrix` section can't use `env`, so it must be entered manually
9+
DEFAULT_PYTHON_VERSION: '3.11'
10+
# It would be nice to be able to also define a DEFAULT_UBUNTU_VERSION
11+
# but sadly `env` can't be used either in `runs-on`.
12+
13+
jobs:
14+
nox:
15+
name: Test with nox
16+
runs-on: ubuntu-24.04
17+
18+
steps:
19+
- name: Run nox
20+
uses: frequenz-floss/[email protected]
21+
with:
22+
python-version: "3.11"
23+
nox-session: ci_checks_max
24+
25+
test-docs:
26+
name: Test documentation website generation
27+
runs-on: ubuntu-24.04
28+
steps:
29+
- name: Setup Git
30+
uses: frequenz-floss/[email protected]
31+
32+
- name: Fetch sources
33+
uses: actions/checkout@v4
34+
with:
35+
submodules: true
36+
37+
- name: Setup Python
38+
uses: frequenz-floss/[email protected]
39+
with:
40+
python-version: ${{ env.DEFAULT_PYTHON_VERSION }}
41+
dependencies: .[dev-mkdocs]
42+
43+
- name: Generate the documentation
44+
env:
45+
MIKE_VERSION: gh-${{ github.job }}
46+
run: |
47+
mike deploy $MIKE_VERSION
48+
mike set-default $MIKE_VERSION
49+
50+
- name: Upload site
51+
uses: actions/upload-artifact@v4
52+
with:
53+
name: docs-site
54+
path: site/
55+
if-no-files-found: error

0 commit comments

Comments
 (0)