From ccc6768d80d620506cda7f247558e2f960e636b0 Mon Sep 17 00:00:00 2001 From: Evgeni Golov Date: Fri, 9 Feb 2024 13:14:34 +0100 Subject: [PATCH] use a container for python 2.7 --- .github/workflows/main.yml | 10 +++++++++- tox.ini | 1 + 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index c3b8eb2..3ba96dd 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -10,17 +10,20 @@ env: jobs: build: runs-on: ubuntu-20.04 + container: ${{ matrix.container }} strategy: fail-fast: false matrix: python: - - "2.7" - "3.6" - "3.7" - "3.8" - "3.9" - "3.10" - "3.11" + include: + - python: "2.7" + container: "python:2.7" env: PYTHON: ${{ matrix.python }} steps: @@ -29,6 +32,10 @@ jobs: uses: actions/setup-python@v5 with: python-version: ${{ matrix.python }} + if: matrix.container == null + - name: Install sudo + run: apt-get update && apt-get install -y sudo + if: matrix.container != null - name: prepare a redhat-uep.pem, even if we run on Ubuntu run: sudo mkdir -p /etc/rhsm/ca/ && sudo curl -o /etc/rhsm/ca/redhat-uep.pem https://ftp.redhat.com/redhat/convert2rhel/redhat-uep.pem - name: Install system dependencies @@ -39,6 +46,7 @@ jobs: for file in /usr/lib/python3/dist-packages/rpm/_rpm*.cpython-*.so; do sudo ln -s ${file} $(echo ${file} | sed 's/\.cpython[^.]*//'); done + if: matrix.container == null - name: Install dependencies run: pip install tox tox-gh-actions - name: Run tests diff --git a/tox.ini b/tox.ini index 444d3a8..745aa77 100644 --- a/tox.ini +++ b/tox.ini @@ -40,3 +40,4 @@ python = 3.9: py39 3.10: py310 3.11: py311 +problem_matcher = False