Skip to content

Update tests action#357

Merged
frostming merged 4 commits intopython-poetry:masterfrom
waketzheng:update-action
Jun 4, 2024
Merged

Update tests action#357
frostming merged 4 commits intopython-poetry:masterfrom
waketzheng:update-action

Conversation

@waketzheng
Copy link
Contributor

  1. Update cache action version
  2. Remove quotes around 3.11
  3. Use map to replace list comprehension

id: full-python-version
shell: bash
run: |
echo ::set-output name=version::$(python -c "import sys; print('-'.join(str(v) for v in sys.version_info))")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you change this to the new GITHUB_OUTPUT syntax?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you mean: echo "{name}={value}" >> "$GITHUB_OUTPUT"?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right

shell: bash
run: |
echo ::set-output name=version::$(python -c "import sys; print('-'.join(str(v) for v in sys.version_info))")
echo name=version::$(python -c "import sys; print('-'.join(map(str, sys.version_info)))") >> "$GITHUB_OUTPUT"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
echo name=version::$(python -c "import sys; print('-'.join(map(str, sys.version_info)))") >> "$GITHUB_OUTPUT"
echo version=$(python -c "import sys; print('-'.join(map(str, sys.version_info)))") >> "$GITHUB_OUTPUT"

@frostming frostming merged commit 22676f9 into python-poetry:master Jun 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants