Skip to content
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 package download args option for downstream action #146

Merged
merged 3 commits into from
Nov 11, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion .github/actions/downstream-test/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ inputs:
description: "The package spec to install"
default: '."[test]"'
required: true
package_download_extra_args:
description: "The arguments used to download the package"
required: true
default: ""
test_command:
description: "The test command"
default: "pytest -vv -raXxs --durations 10 --color=yes"
Expand All @@ -28,6 +32,7 @@ runs:
package_name=${{inputs.package_name}}
package_spec="${{inputs.package_spec}}"
test_command="${{inputs.test_command}}"
package_download_extra_args="${{inputs.package_download_args}}"
root=$(pwd)
eval "${{inputs.env_values}}"
echo "::endgroup::"
Expand All @@ -43,7 +48,7 @@ runs:
echo "::group::Download and extract the sdist"
mkdir downstream_test
cd downstream_test
pip download --no-deps --no-binary ${package_name} ${package_name}
pip download ${package_download_extra_args} --no-deps --no-binary ${package_name} ${package_name}
mkdir ${package_name}
tar xfz *.tar.gz -C ${package_name} --strip-components 1
cd ${package_name}
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ jobs:
with:
package_name: nbclient
package_spec: "nbclient[test] ipykernel"
package_download_extra_args: "--use-pep517"
test_command: "echo 'hello'"
extra_test: "pytest --pyargs nbclient"
env_values: IPYKERNEL_CELL_NAME=\<IPY-INPUT\>
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,8 @@ jobs:
env_values: "FIZZ=buzz NAME=snuffy"
```

To test against a prerelease use `package_download_extra_args: "--pre"`.

## Test Against Dependency Minimum Version

Use this action to test that your minimum dependency version constraints are vaild. Note: you may want to also use the minimum supported version of Python
Expand Down