diff --git a/.github/workflows/tox.yml b/.github/workflows/tox.yml index 712e3a5..0c76865 100644 --- a/.github/workflows/tox.yml +++ b/.github/workflows/tox.yml @@ -16,7 +16,7 @@ on: jobs: build: - name: ${{ matrix.tox_env }} + name: ${{ matrix.name || matrix.tox_env }} # ubuntu-latest is current older and we need last podman toolkit. # https://docs.github.com/en/actions/reference/virtual-environments-for-github-hosted-runners runs-on: ubuntu-20.04 @@ -25,42 +25,45 @@ jobs: matrix: include: - tox_env: lint + python-version: 3.8 # - tox_env: docs - - tox_env: py38-ansible212 + - tox_env: packaging + python-version: 3.8 + - name: py38 + tox_env: py38,py38-devel PREFIX: PYTEST_REQPASS=5 - - tox_env: py39-ansible212 + python-version: 3.8 + - name: py39 + tox_env: py39,py39-devel PREFIX: PYTEST_REQPASS=5 - - tox_env: py39-devel + python-version: 3.9 + - name: py310 + tox_env: py310,py310-devel PREFIX: PYTEST_REQPASS=5 - - tox_env: packaging + python-version: "3.10" + - name: py311 + tox_env: py311,py311-devel + PREFIX: PYTEST_REQPASS=5 + python-version: "~3.11.0-0" steps: + - name: Check out src from Git uses: actions/checkout@v2 with: fetch-depth: 0 # needed by setuptools-scm - - name: Find python version - id: py_ver - shell: python - if: ${{ contains(matrix.tox_env, 'py') }} - run: | - v = '${{ matrix.tox_env }}'.split('-')[0].lstrip('py') - print('::set-output name=version::{0}.{1}'.format(v[0],v[1:])) - # Even our lint and other envs need access to tox - - name: Install a default Python - uses: actions/setup-python@v2 - if: ${{ ! contains(matrix.tox_env, 'py') }} - # Be sure to install the version of python needed by a specific test, if necessary + - name: Set up Python version - uses: actions/setup-python@v2 - if: ${{ contains(matrix.tox_env, 'py') }} + uses: actions/setup-python@v3 with: - python-version: ${{ steps.py_ver.outputs.version }} + python-version: ${{ matrix.python-version }} + - name: Install dependencies run: | podman version podman info python -m pip install -U "pip>=21.2.4" "tox>=3.24.2" + - name: Run tox -e ${{ matrix.tox_env }} run: | echo "${{ matrix.PREFIX }} tox -e ${{ matrix.tox_env }}" diff --git a/setup.cfg b/setup.cfg index 4812c16..be20b02 100644 --- a/setup.cfg +++ b/setup.cfg @@ -39,6 +39,8 @@ classifiers = Programming Language :: Python :: 3 Programming Language :: Python :: 3.8 Programming Language :: Python :: 3.9 + Programming Language :: Python :: 3.10 + Programming Language :: Python :: 3.11 Topic :: System :: Systems Administration Topic :: Utilities diff --git a/src/molecule_podman/driver.py b/src/molecule_podman/driver.py index 056624f..9d3f98a 100644 --- a/src/molecule_podman/driver.py +++ b/src/molecule_podman/driver.py @@ -192,7 +192,7 @@ def login_cmd_template(self): f"{self.podman_cmd} exec " "-e COLUMNS={columns} " "-e LINES={lines} " - "-e TERM=bash " + "-e SHELL=bash " "-e TERM=xterm " "-ti {instance} bash" ) diff --git a/tox.ini b/tox.ini index ad5e79f..b57287f 100644 --- a/tox.ini +++ b/tox.ini @@ -4,7 +4,8 @@ envlist = lint docs packaging - py{38,39}-{ansible212,devel} + py + py-devel requires = virtualenv >= 20.14.0 @@ -38,10 +39,8 @@ setenv = # new resolve a must or test extras will not install right MOLECULE_NO_LOG=0 deps = - py{,38,39}-{!devel}: molecule[test]>=3.5.0 - py{,38,39}-{devel}: git+https://github.com/ansible-community/molecule.git@main#egg=molecule[test] - ansible212: ansible-core>=2.12.4,<2.13.0 - dockerfile: ansible-core>=2.12.4 + !devel: molecule[test]>=3.5.0 + devel: git+https://github.com/ansible-community/molecule.git@main#egg=molecule[test] selinux commands_pre = # No need to bother starting tests if these are now working