-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add read-file
action
#203
Add read-file
action
#203
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
3081552
to
719ff88
Compare
assert '''${{ steps.json.outputs.content }}''' == '''${{ steps.yaml.outputs.content }}''' | ||
assert '''${{ fromJSON(steps.json.outputs.content)['foo'] }}''' == '''${{ fromJSON(steps.yaml.outputs.content)['foo'] }}''' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any reason to use triple single quotes here and not single double quotes?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because the json values might contain quotes at some point in the future 🤷🏼♂️
Run a test server on a random port. Inspect returned server to get port, | ||
shutdown etc. | ||
|
||
See https://github.com/conda/conda/blob/52b6393d6331e8aa36b2e23ab65766a980f381d2/tests/http_test_server.py |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have we copied this fixture enough around that it would be useful to have it on PyPI as a pytest extension?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AFAIK this is only the second place and idk how much we'd benefit from standardizing this further, this has deviated quite a bit from what was copied
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I miss remembered, this fixture is almost identical to the one in conda
Description
Depends on #243
Adding a
read-file
action that will support reading a local or remote file and supports both JSON and Yaml but will also allow leaving the output as a plain string.This action replaces
read-yaml
.