Skip to content

Commit

Permalink
.github/workflows/main.yml: Py2.7: Use a wrapper for setup-python
Browse files Browse the repository at this point in the history
Because of the announcement of removal of Python 2.7 for setup-python
in actions/setup-python#672, use a wrapper
for setup-python which can build missing Python versions.

Signed-off-by: Bernhard Kaindl <bernhard.kaindl@cloud.com>
  • Loading branch information
bernhardkaindl committed Jun 13, 2023
1 parent 2f6fdd8 commit a0b8a36
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,17 @@ jobs:
with:
fetch-depth: 0 # Needed by diff-cover to get the changed lines: origin/master..HEAD
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
# uses: actions/setup-python@v4 due to https://github.com/actions/setup-python/issues/672:
# https://github.com/MatteoH2O1999/setup-python
# This action tries to build from source all Python versions that actions/setup-python
# does not support. It also allows to cache built versions so that after the first run,
# installation time is really low. Hope it works also with 20.04, else it needs more changes:
uses: MatteoH2O1999/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
allow-build: info
cache-build: true
cache: pip

- name: Run of tox on ubuntu-latest
if: ${{ startsWith(matrix.python-version, '3.') && matrix.python-version != 3.6 }}
Expand Down

0 comments on commit a0b8a36

Please sign in to comment.