Skip to content

Commit 19b79f7

Browse files
committed
CI: Fix tests on Linux, Ansible tests targetting Debian 9 & 11
Without Ubuntu 20.04 virtualenv package being installed pip was installing a version of virtualenv that couldn't create the Tox environment for Python 2.7. > Successfully installed distlib-0.3.6 filelock-3.12.2 platformdirs-3.8.0 > pluggy-1.2.0 py-1.11.0 tomli-2.0.1 tox-3.28.0 virtualenv-20.23.1 > Finishing: Install tooling > ... > py27-mode_mitogen-distro_centos6 create: /home/vsts/work/1/s/.tox/py27- > mode_mitogen-distro_centos6 > ERROR: invocation failed (exit code 1), logfile: /home/vsts/work/1/s/.tox/ > py27-mode_mitogen-distro_centos6/log/py27-mode_mitogen-distro_centos6-0.log > ================================== log start > =================================== > RuntimeError: failed to query /usr/bin/python2.7 with code 1 err: > ' File "/home/vsts/.local/lib/python3.8/site-packages/virtualenv/discovery/ > py_info.py", line 24\n return list(OrderedDict.fromkeys(["", > *os.environ.get("PATHEXT", "").lower().split(os.pathsep)]))\n > ^\nSyntaxError: invalid syntax\n'
1 parent 330375b commit 19b79f7

File tree

5 files changed

+31
-1
lines changed

5 files changed

+31
-1
lines changed

.ci/azure-pipelines-steps.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,14 @@ steps:
1212
versionSpec: '$(python.version)'
1313
condition: ne(variables['python.version'], '')
1414

15+
- script: |
16+
type python
17+
python --version
18+
displayName: Show python version
19+
1520
- script: |
1621
sudo apt-get update
17-
sudo apt-get install -y python2-dev
22+
sudo apt-get install -y python2-dev python3-pip virtualenv
1823
displayName: Install build deps
1924
condition: and(eq(variables['python.version'], ''), eq(variables['Agent.OS'], 'Linux'))
2025

docs/changelog.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ v0.3.4.dev0
2828
resource leaks.
2929
* :gh:issue:`659` Removed :mod:`mitogen.compat.simplejson`, not needed with Python 2.7+, contained Python 3.x syntax errors
3030
* :gh:issue:`983` CI: Removed PyPI faulthandler requirement from tests
31+
* :gh:issue:`1001` CI: Fixed Debian 9 & 11 tests
3132

3233
v0.3.3 (2022-06-03)
3334
-------------------
Binary file not shown.
Binary file not shown.

tests/ansible/regression/issue_776__load_plugins_called_twice.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,30 @@
1515
when:
1616
- ansible_facts.pkg_mgr in ["dnf"]
1717

18+
- name: Switch to archive.debian.org
19+
# Debian 9 has been archived https://lists.debian.org/debian-devel-announce/2023/03/msg00006.html
20+
copy:
21+
content: |
22+
deb http://archive.debian.org/debian stretch main contrib non-free
23+
dest: /etc/apt/sources.list
24+
mode: u=rw,go=r
25+
when:
26+
- ansible_facts.distribution == "Debian"
27+
- ansible_facts.distribution_major_version == "9"
28+
29+
- name: Add signing keys
30+
copy:
31+
src: "{{ item.src }}"
32+
dest: "/etc/apt/trusted.gpg.d/{{ item.src | basename }}"
33+
mode: u=rw,go=r
34+
loop:
35+
- src: debian-archive-bullseye-automatic.gpg # Debian 11
36+
- src: debian-archive-bookworm-automatic.gpg # Debian 12
37+
when:
38+
# Ideally this would check for Debian 11, but distribution_major_version
39+
# is unpopulated sometimes.
40+
- ansible_facts.distribution == "Debian"
41+
1842
- name: Update package index
1943
apt:
2044
update_cache: true

0 commit comments

Comments
 (0)