File tree Expand file tree Collapse file tree 1 file changed +27
-0
lines changed
.github/actions/test-downstream Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : " Downstream Test"
2
+ description : " Test against a downstream library"
3
+ inputs :
4
+ package_name :
5
+ description : " The downstream package name"
6
+ required : true
7
+ package_spec :
8
+ description : " The package spec(s) to install, defaults to '<package_name>[test]"
9
+ pytest_args :
10
+ description : " The pytest args (defaults to '--pyargs <package_name>'"
11
+ env_values :
12
+ description : " Optional env values to set for test, e.g. 'FOO=BAR FIZZ=BUZZ'"
13
+ runs :
14
+ using : " composite"
15
+ steps :
16
+ - name : set up venv
17
+ shell : bash
18
+ run : |
19
+ package_spec=${${{input.package_spec}}:-"${{inputs.package_name}}[test]"}
20
+ pytest_args=${${{input.pytest_args}}:-"--pyargs ${{inputs.package_name}}"}
21
+ python -m venv test_venv
22
+ bin_dir=./test_venv/bin
23
+ ${bin_dir}/python -m pip install -U pip
24
+ ${bin_dir}/python -m pip install ${package_spec}
25
+ ${bin_dir}/python -m pip install . --force-reinstall
26
+ ${{ input.env_values }} ${bin_dir}/pytest ${pytest_args}
27
+ rm -rf ./test_venv
You can’t perform that action at this time.
0 commit comments