File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3535 - name : Set default python version
3636 run : sudo update-alternatives --install /usr/bin/python python ${pythonLocation}/bin/python3.8 2
3737
38-
3938 - name : Install python dependencies
4039 run : |
4140 pip install molecule[docker,ansible] molecule-docker yamllint ansible-lint docker openwisp-utils[qa]
4746 openwisp-qa-check --skip-isort --skip-flake8 --skip-checkmigrations --skip-black
4847
4948 - name : Tests
50- run : molecule test
49+ run : |
50+ mkdir -p ~/.ansible/roles
51+ ln -s $GITHUB_WORKSPACE ~/.ansible/roles/openwisp.openwisp2
52+ molecule test
5153 env :
5254 ROLE_NAME : openwisp2
5355 PY_COLORS : ' 1'
Original file line number Diff line number Diff line change @@ -8,11 +8,11 @@ openwisp2_monitoring: true
88openwisp2_radius : false
99openwisp2_controller_subnet_division : false
1010openwisp2_radius_urls : " {{ openwisp2_radius }}"
11- openwisp2_controller_version : " openwisp-controller~=1.0.0 "
11+ openwisp2_controller_version : " openwisp-controller~=1.0.1 "
1212openwisp2_network_topology_version : " openwisp-network-topology~=1.0.0"
1313openwisp2_firmware_upgrader_version : " openwisp-firmware-upgrader~=1.0.0"
1414openwisp2_monitoring_version : " openwisp-monitoring~=1.0.0"
15- openwisp2_radius_version : " openwisp-radius~=1.0.0 "
15+ openwisp2_radius_version : " openwisp-radius~=1.0.1 "
1616openwisp2_django_version : " {{ 'django~=4.0.0' if ansible_distribution_release|string in ['focal', 'bullseye'] else 'django~=3.2.13' }}"
1717openwisp2_extra_python_packages :
1818 - bpython
Original file line number Diff line number Diff line change 3636 register : result
3737 until : result is success
3838
39- - name : Install redis 6 if available
39+ - name : Install redis
4040 apt :
41- name : " redis-server=5:6* "
41+ name : redis-server
4242 notify :
4343 - reload systemd
4444 - start redis
45- ignore_errors : true
46- register : use_redis6
4745 when : openwisp2_redis_install
4846
49- - name : Install redis 5 if available
50- apt :
51- name : " redis-server=5:5*"
52- notify :
53- - reload systemd
54- - start redis
55- ignore_errors : true
56- register : use_redis5
57- when : openwisp2_redis_install and use_redis6 is failed
58-
59- - name : Install redis 4 (fallback)
60- when : openwisp2_redis_install and (use_redis5 is failed and use_redis6 is failed)
61- apt :
62- name : " redis-server=5:4*"
63- register : use_redis4
64- notify :
65- - reload systemd
66- - start redis
67-
6847# On the newer versions of redis, by default redis
6948# binds to localhost on ipv6 address which wouldn't
7049# let the service start if the server doesn't have
7756 regexp : ' ^bind 127\.0\.0\.1 ::1'
7857 line : ' bind 127.0.0.1'
7958 backrefs : true
59+ ignore_errors : true
8060
8161- name : start redis
8262 when : openwisp2_redis_install
189169 - name : Set python 3.7
190170 set_fact :
191171 openwisp2_python : python3.7
192- when : openwisp2_should_install_python_37 == "True\n"
172+ when : openwisp2_should_install_python_37 == true
193173
194174- name : Install python3 packages
195175 apt :
Original file line number Diff line number Diff line change 5454 tags :
5555 - molecule-idempotence-notest
5656
57- - name : Pin channels_redis to 2.4 for redis 4 compatibility
58- when : use_redis4 is defined and use_redis4 is succeeded
57+ - name : Install channels-redis~=3.4.0
58+ when : ansible_distribution_release not in ['buster', 'bionic']
5959 pip :
6060 name :
61- - channels_redis~=2.4
61+ - channels-redis~=3.4.0
62+ state : latest
63+ virtualenv : " {{ virtualenv_path }}"
64+ virtualenv_python : " {{ openwisp2_python }}"
65+ virtualenv_site_packages : true
66+ environment :
67+ SETUPTOOLS_USE_DISTUTILS : stdlib
68+ retries : 1
69+ delay : 10
70+ register : result
71+ until : result is success
72+
73+ - name : Install channels-redis~=2.4.0 for redis 4 compatibility
74+ when : ansible_distribution_release in ['buster', 'bionic']
75+ pip :
76+ name :
77+ - channels-redis~=2.4.0
6278 state : latest
6379 virtualenv : " {{ virtualenv_path }}"
6480 virtualenv_python : " {{ openwisp2_python }}"
You can’t perform that action at this time.
0 commit comments