Skip to content

Update testing-rootuser.yml #7

Update testing-rootuser.yml

Update testing-rootuser.yml #7

name: Test Ensurepip Skipping - Container Root User
on:
push:
branches:
- main
workflow_dispatch:
jobs:
test-containers:
runs-on: ubuntu-latest
strategy:
matrix:
container_image: [ubuntu:22.04, ubuntu:24.04]
python_version: [3.11.6, 3.10.13, 3.9.18]
container:
image: ${{ matrix.container_image }}
steps:
- uses: actions/checkout@v4
- name: Install prerequisites (lsb-release, curl, etc.)
run: |
apt-get update
apt-get install -y lsb-release curl
- name: Fake /etc/lsb-release (if needed)
run: |
if [ ! -f /etc/lsb-release ]; then
echo "DISTRIB_RELEASE=${{ matrix.container_image == 'ubuntu:24.04' && '24.04' || '22.04' }}" | tee -a /etc/lsb-release
fi
- name: Change ownership of /github/home (if needed)
run: |
chown -R $(whoami) /github/home
- name: Setup Python
# uses: actions/setup-python@v5
uses: lmvysakh/setup-python@rootuser_warning_fix
with:
python-version: ${{ matrix.python_version }}
cache: 'pip'
cache-dependency-path: 'requirements.txt'