Try running tests on Ubuntu 22.04. #221
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
name: Molecule Test | |
on: | |
push: | |
pull_request: | |
schedule: | |
- cron: '30 5 * * 0' | |
jobs: | |
molecule: | |
runs-on: ubuntu-22.04 | |
strategy: | |
matrix: | |
python-version: [3.9, "3.10", 3.11] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
run: | | |
python3 -m pip install --upgrade pip | |
python3 -m pip install -r requirements-dev.txt | |
- name: Ensure Docker is running and accessible | |
run: | | |
docker info | |
docker ps | |
- name: Debug Docker Python SDK connectivity | |
run: | | |
python -c " | |
import docker | |
try: | |
client = docker.from_env() | |
print('✅ Connected to Docker. Version:', client.version()) | |
except Exception as e: | |
print('❌ Docker SDK error:', e) | |
" | |
- name: Run molecule test | |
env: | |
DOCKER_HOST: unix:///var/run/docker.sock # Ensure correct scheme | |
run: | | |
molecule test |