File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -10,3 +10,5 @@ Helper actions for Python projects
1010| [ run-cibuildwheel] ( ./run-cibuildwheel ) | ` actions-ext/python/run-cibuildwheel ` | Run [ ` cibuildwheel ` ] ( https://cibuildwheel.readthedocs.io/en/stable/ ) |
1111| [ upload-dist] ( ./upload-dist ) | ` actions-ext/python/upload-dist ` | Upload a python sdist or wheel |
1212| [ download-dist] ( ./download-dist ) | ` actions-ext/python/download-dist ` | Download and install a python sdist or wheel |
13+ | [ test-wheel] ( ./test-wheel ) | ` actions-ext/python/test-wheel ` | Install a wheel in a fresh venv and verify module import |
14+ | [ test-sdist] ( ./test-sdist ) | ` actions-ext/python/test-sdist ` | Install an sdist in a fresh venv and verify module import |
Original file line number Diff line number Diff line change 1+ name : Test Sdist Install
2+ description : ' Install an sdist from dist/ in a fresh venv and verify a module can be imported'
3+
4+ inputs :
5+ module :
6+ description : " Python module name to test importing"
7+ required : true
8+
9+ runs :
10+ using : ' composite'
11+ steps :
12+ - name : Test sdist install
13+ shell : bash
14+ run : |
15+ python -m venv .test-sdist
16+ VENV_BIN=".test-sdist/bin"; [ -d ".test-sdist/Scripts" ] && VENV_BIN=".test-sdist/Scripts"
17+ "$VENV_BIN/pip" install dist/*.tar.gz
18+ "$VENV_BIN/python" -c "import ${{ inputs.module }}"
Original file line number Diff line number Diff line change 1+ name : Test Wheel Install
2+ description : ' Install a wheel from dist/ in a fresh venv and verify a module can be imported'
3+
4+ inputs :
5+ module :
6+ description : " Python module name to test importing"
7+ required : true
8+
9+ runs :
10+ using : ' composite'
11+ steps :
12+ - name : Test wheel install
13+ shell : bash
14+ run : |
15+ python -m venv .test-wheel
16+ VENV_BIN=".test-wheel/bin"; [ -d ".test-wheel/Scripts" ] && VENV_BIN=".test-wheel/Scripts"
17+ "$VENV_BIN/pip" install dist/*.whl
18+ "$VENV_BIN/python" -c "import ${{ inputs.module }}"
You can’t perform that action at this time.
0 commit comments