Merge ~jugmac00/launchpadlib:add-minimal-CI-configuration into launchpadlib:main

Proposed by Jürgen Gmach
Status: Merged
Merged at revision: aead2ad471dfce3cd3f2386e6c2e453b3b3cc47d
Proposed branch: ~jugmac00/launchpadlib:add-minimal-CI-configuration
Merge into: launchpadlib:main
Diff against target: 44 lines (+27/-0)
2 files modified
.launchpad.yaml (+19/-0)
tox.ini (+8/-0)
Reviewer Review Type Date Requested Status
Andrey Fedoseev (community) Approve
Review via email: mp+432303@code.launchpad.net

Commit message

Add minimal CI configuration

To post a comment you must log in.
Revision history for this message
Andrey Fedoseev (andrey-fedoseev) wrote :

> In order to run all tox environments, we need to discuss a proper way
how to provide different Python versions.

I guess, for that we can specify different test jobs for each series/python version:

jobs:
  test-focal:
    series: focal
    run: tox -e py38
  test-jammy:
    series: jammy
    run: tox -e py310

review: Approve
Revision history for this message
Jürgen Gmach (jugmac00) wrote :

Thanks for this idea, Andrey!

I think this is absolutely fine for most of our packages, but not perfect for `launchpadlib`, as this is a client library, which our users install, and we have no control over which Python version they would use, e.g. a friend of mine works for Red Hat and still uses `launchpadlib` and he runs Fedora with the whatever Python version he prefers.

Revision history for this message
Andrey Fedoseev (andrey-fedoseev) wrote :

Jürgen, with that approach we can test for all Python versions we are interested in, I suppose. I think we can find any Python version in either of Ubuntu series.

Revision history for this message
Jürgen Gmach (jugmac00) wrote :

Almost!

And indeed, when I think of Ubuntu, I wrongly only think of LTS releases:
https://jugmac00.github.io/blog/ubuntu-versions-cheat-sheet/

So, we could test all Python versions, except Python 3.11, as kinetic comes with Python 3.10, but this would mean that we need to spin up a new image for each Python version, and we could never just run `tox` or `tox -p` to cover all tests.

As mentioned, we will discuss this in Prague.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
diff --git a/.launchpad.yaml b/.launchpad.yaml
0new file mode 1006440new file mode 100644
index 0000000..9f7ff95
--- /dev/null
+++ b/.launchpad.yaml
@@ -0,0 +1,19 @@
1pipeline:
2 - lint
3 - tests
4
5jobs:
6 lint:
7 architectures: amd64
8 packages:
9 - tox
10 - git
11 snaps: [go]
12 run: tox -e lint
13 series: focal
14 tests:
15 architectures: amd64
16 packages:
17 - tox
18 run: tox -e py38
19 series: focal
diff --git a/tox.ini b/tox.ini
index 62e0880..be0759a 100644
--- a/tox.ini
+++ b/tox.ini
@@ -9,6 +9,14 @@ commands =
9 coverage run -m pytest src/launchpadlib/tests {posargs}9 coverage run -m pytest src/launchpadlib/tests {posargs}
1010
11[testenv:lint]11[testenv:lint]
12# necessary to build the woke linter
13setenv =
14 GOCACHE = {envdir}/gocache
15# adding http(s)_proxy is a workaround for
16# https://github.com/tox-dev/tox/pull/2378/files
17passenv =
18 http_proxy
19 https_proxy
12basepython =20basepython =
13 python3.821 python3.8
14deps =22deps =

Subscribers

People subscribed via source and target branches