Commit 5cf3865f authored by Jason R. Coombs's avatar Jason R. Coombs Committed by GitHub

Merge pull request #2457 from webknjaz/testing/gha-broken-setup-python

Upgrade GHA actions using deprecated env mechanism
parents 544687c3 de48cfdb
...@@ -50,6 +50,11 @@ jobs: ...@@ -50,6 +50,11 @@ jobs:
if: >- if: >-
endsWith(env.PYTHON_VERSION, '-beta') || endsWith(env.PYTHON_VERSION, '-beta') ||
endsWith(env.PYTHON_VERSION, '-dev') endsWith(env.PYTHON_VERSION, '-dev')
# FIXME: replace `set-env` with a newer alternative
# Refs:
# * github.blog/changelog/2020-10-01-github-actions-deprecating-set-env-and-add-path-commands/
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
run: | run: |
from __future__ import print_function from __future__ import print_function
python_version = '${{ env.PYTHON_VERSION }}'.replace('-beta', '') python_version = '${{ env.PYTHON_VERSION }}'.replace('-beta', '')
...@@ -59,10 +64,16 @@ jobs: ...@@ -59,10 +64,16 @@ jobs:
- name: Set up Python ${{ env.PYTHON_VERSION }} (deadsnakes) - name: Set up Python ${{ env.PYTHON_VERSION }} (deadsnakes)
uses: deadsnakes/action@v1.0.0 uses: deadsnakes/action@v1.0.0
if: fromJSON(env.USE_DEADSNAKES) && true || false if: fromJSON(env.USE_DEADSNAKES) && true || false
# FIXME: drop once deadsnakes/action gets fixed
# Refs:
# * github.com/deadsnakes/issues/issues/135
# * github.blog/changelog/2020-10-01-github-actions-deprecating-set-env-and-add-path-commands/
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
with: with:
python-version: ${{ env.PYTHON_VERSION }} python-version: ${{ env.PYTHON_VERSION }}
- name: Set up Python ${{ env.PYTHON_VERSION }} - name: Set up Python ${{ env.PYTHON_VERSION }}
uses: actions/setup-python@v2.1.1 uses: actions/setup-python@v2
if: >- if: >-
!fromJSON(env.USE_DEADSNAKES) && true || false !fromJSON(env.USE_DEADSNAKES) && true || false
with: with:
...@@ -77,7 +88,7 @@ jobs: ...@@ -77,7 +88,7 @@ jobs:
run: >- run: >-
python -m sysconfig python -m sysconfig
- name: Pip cache - name: Pip cache
uses: actions/cache@v1 uses: actions/cache@v2
with: with:
path: ~/.cache/pip path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('setup.cfg') }} key: ${{ runner.os }}-pip-${{ hashFiles('setup.cfg') }}
...@@ -99,6 +110,11 @@ jobs: ...@@ -99,6 +110,11 @@ jobs:
python -m pip freeze --all python -m pip freeze --all
- name: Adjust TOXENV for PyPy - name: Adjust TOXENV for PyPy
if: startsWith(env.PYTHON_VERSION, 'pypy') if: startsWith(env.PYTHON_VERSION, 'pypy')
# FIXME: replace `set-env` with a newer alternative
# Refs:
# * github.blog/changelog/2020-10-01-github-actions-deprecating-set-env-and-add-path-commands/
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
run: >- run: >-
echo "::set-env name=TOXENV::${{ env.PYTHON_VERSION }}" echo "::set-env name=TOXENV::${{ env.PYTHON_VERSION }}"
- name: Log env vars - name: Log env vars
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment