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
1diff --git a/.launchpad.yaml b/.launchpad.yaml
2new file mode 100644
3index 0000000..9f7ff95
4--- /dev/null
5+++ b/.launchpad.yaml
6@@ -0,0 +1,19 @@
7+pipeline:
8+ - lint
9+ - tests
10+
11+jobs:
12+ lint:
13+ architectures: amd64
14+ packages:
15+ - tox
16+ - git
17+ snaps: [go]
18+ run: tox -e lint
19+ series: focal
20+ tests:
21+ architectures: amd64
22+ packages:
23+ - tox
24+ run: tox -e py38
25+ series: focal
26diff --git a/tox.ini b/tox.ini
27index 62e0880..be0759a 100644
28--- a/tox.ini
29+++ b/tox.ini
30@@ -9,6 +9,14 @@ commands =
31 coverage run -m pytest src/launchpadlib/tests {posargs}
32
33 [testenv:lint]
34+# necessary to build the woke linter
35+setenv =
36+ GOCACHE = {envdir}/gocache
37+# adding http(s)_proxy is a workaround for
38+# https://github.com/tox-dev/tox/pull/2378/files
39+passenv =
40+ http_proxy
41+ https_proxy
42 basepython =
43 python3.8
44 deps =

Subscribers

People subscribed via source and target branches