Skip to content
This repository has been archived by the owner on Jan 8, 2023. It is now read-only.

Commit

Permalink
Merge branch 'main' into pre-commit-ci-update-config
Browse files Browse the repository at this point in the history
  • Loading branch information
ssbarnea authored Jul 18, 2022
2 parents 761babc + ddc45e6 commit 7e18548
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 26 deletions.
43 changes: 23 additions & 20 deletions .github/workflows/tox.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 }}"
Expand Down
2 changes: 2 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/molecule_podman/driver.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)
Expand Down
9 changes: 4 additions & 5 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ envlist =
lint
docs
packaging
py{38,39}-{ansible212,devel}
py
py-devel

requires =
virtualenv >= 20.14.0
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 7e18548

Please sign in to comment.