Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
setuptools
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jérome Perrin
setuptools
Commits
4a4d50af
Commit
4a4d50af
authored
Nov 20, 2020
by
Sviatoslav Sydorenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix all deprecated set-env and add-path uses @ GHA
parent
5cf3865f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
15 deletions
+8
-15
.github/workflows/python-tests.yml
.github/workflows/python-tests.yml
+8
-15
No files found.
.github/workflows/python-tests.yml
View file @
4a4d50af
...
@@ -57,19 +57,15 @@ jobs:
...
@@ -57,19 +57,15 @@ jobs:
ACTIONS_ALLOW_UNSECURE_COMMANDS
:
true
ACTIONS_ALLOW_UNSECURE_COMMANDS
:
true
run
:
|
run
:
|
from __future__ import print_function
from __future__ import print_function
import os
python_version = '${{ env.PYTHON_VERSION }}'.replace('-beta', '')
python_version = '${{ env.PYTHON_VERSION }}'.replace('-beta', '')
print('::set-env name=PYTHON_VERSION::{ver}'.format(ver=python_version))
with open(os.environ['GITHUB_ENV'], 'a') as env_file:
print('::set-env name=USE_DEADSNAKES::true')
env_file.write('PYTHON_VERSION={ver}\n'.format(ver=python_version))
env_file.write('USE_DEADSNAKES=true\n')
shell
:
python
shell
:
python
-
name
:
Set up Python ${{ env.PYTHON_VERSION }} (deadsnakes)
-
name
:
Set up Python ${{ env.PYTHON_VERSION }} (deadsnakes)
uses
:
deadsnakes/action@v
1.0.0
uses
:
deadsnakes/action@v
2.0.1
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 }}
...
@@ -110,13 +106,10 @@ jobs:
...
@@ -110,13 +106,10 @@ 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 "TOXENV=${{ env.PYTHON_VERSION }}"
>>
"${GITHUB_ENV}"
-
name
:
Log env vars
-
name
:
Log env vars
run
:
>-
run
:
>-
env
env
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment