tests: add sanity tests for python 2.7

Automation Hub still runs sanity tests on python 2.7

updating release to 1.1.1 to publish a new version.
This commit is contained in:
Yusuke Tsutsumi 2022-12-16 16:34:31 +00:00 committed by Yusuke Tsutsumi
commit 509e0207ff
6 changed files with 34 additions and 7 deletions

View file

@ -21,11 +21,20 @@ jobs:
uses: actions/setup-python@v1
with:
python-version: ${{ env.PYTHON_VERSION }}
# Automation-hub requires python2.7 sanity tests
- name: setup python2.7
run: |
sudo apt-add-repository universe
sudo apt update
sudo apt install python2.7
curl https://bootstrap.pypa.io/pip/2.7/get-pip.py --output get-pip.py
sudo /usr/bin/python2.7 get-pip.py
pip2 install virtualenv
- name: Install ansible-base (${{ matrix.ansible_version }})
run: pip install https://github.com/ansible/ansible/archive/${{ matrix.ansible_version }}.tar.gz --disable-pip-version-check
- name: Run ansible-test sanity
# validate-modules cannot be turned on until #498 is resolved.
run: ansible-test sanity -v --color --python "$PYTHON_VERSION" --skip validate-modules
run: ansible-test sanity -v --color --skip validate-modules
- name: Install ansible-lint
run: pip install ansible-lint
- name: Run ansible-lint
@ -48,7 +57,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v1
with:
python-version: ${{ env.PYTHON_VERSION }}
python-version: "${{ env.PYTHON_VERSION }}"
- name: Install dependencies
run: pip install -r requirements.txt
- name: Install test dependencies