mirror of
https://github.com/linux-system-roles/network.git
synced 2026-01-23 10:25:28 +00:00
python version depends on platform; upgrade checkout, setup-python; support py311 [citest skip]
The python version used now requires a corresponding os version e.g. python 2.7 and python 3.6 are no longer supported on ubuntu-latest - must use 20.04. Update the python matrix to include the os to use as well. Use checkout@v3 and setup-python@v4 python 3.11 stable is now supported by setup-python Add `push` action for status reporting on role main page if missing Use `docker` for ansible-test if not already doing that Signed-off-by: Rich Megginson <rmeggins@redhat.com>
This commit is contained in:
parent
af4c851d5c
commit
f2e28ff0a6
1 changed files with 19 additions and 6 deletions
25
.github/workflows/tox.yml
vendored
25
.github/workflows/tox.yml
vendored
|
|
@ -12,17 +12,29 @@ env:
|
|||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
jobs:
|
||||
python:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
pyver: ['2.7', '3.6', '3.8', '3.9', '3.10']
|
||||
pyver_os:
|
||||
- ver: '2.7'
|
||||
os: ubuntu-20.04
|
||||
- ver: '3.6'
|
||||
os: ubuntu-20.04
|
||||
- ver: '3.8'
|
||||
os: ubuntu-latest
|
||||
- ver: '3.9'
|
||||
os: ubuntu-latest
|
||||
- ver: '3.10'
|
||||
os: ubuntu-latest
|
||||
- ver: '3.11'
|
||||
os: ubuntu-latest
|
||||
runs-on: ${{ matrix.pyver_os.os }}
|
||||
steps:
|
||||
- name: checkout PR
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v3
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v2
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: ${{ matrix.pyver }}
|
||||
python-version: ${{ matrix.pyver_os.ver }}
|
||||
- name: Install platform dependencies, python, tox, tox-lsr
|
||||
run: |
|
||||
set -euxo pipefail
|
||||
|
|
@ -34,7 +46,7 @@ jobs:
|
|||
- name: Run tox tests
|
||||
run: |
|
||||
set -euxo pipefail
|
||||
toxpyver=$(echo "${{ matrix.pyver }}" | tr -d .)
|
||||
toxpyver=$(echo "${{ matrix.pyver_os.ver }}" | tr -d .)
|
||||
toxenvs="py${toxpyver}"
|
||||
case "$toxpyver" in
|
||||
27) toxenvs="${toxenvs},coveralls,flake8,pylint" ;;
|
||||
|
|
@ -42,6 +54,7 @@ jobs:
|
|||
38) toxenvs="${toxenvs},coveralls,ansible-lint,ansible-plugin-scan,collection,ansible-test" ;;
|
||||
39) toxenvs="${toxenvs},coveralls,ansible-managed-var-comment" ;;
|
||||
310) toxenvs="${toxenvs},coveralls,check-meta-versions" ;;
|
||||
311) toxenvs="${toxenvs},coveralls" ;;
|
||||
esac
|
||||
TOXENV="$toxenvs" lsr_ci_runtox
|
||||
python-26:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue