forked from Madoshakalaka/pipenv-setup
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
this workflow is intended to test the installation of this project and its CLI Signed-off-by: Bryant Finney <bryant.finney@alumni.uah.edu>
- Loading branch information
1 parent
38674f8
commit c78251e
Showing
1 changed file
with
61 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
# ------------------------------------------------------------------------------------- | ||
# Summary: Test the external CLI usage of this project. | ||
# Created: 2021-11-20 18:44:48 | ||
# Author: Bryant Finney <bryant.finney@alumni.uah.edu> (https://bryant-finney.github.io/about) | ||
# ------------------------------------------------------------------------------------- | ||
name: Test Usage | ||
|
||
on: | ||
push: | ||
pull_request: | ||
workflow_dispatch: | ||
release: | ||
types: [published] | ||
|
||
jobs: | ||
build-wheel: | ||
name: Build wheel | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-python@v2 | ||
|
||
- name: Prepare build system | ||
run: pip install --upgrade pip setuptools wheel | ||
|
||
- name: Build wheel and source distribution 🛠️ | ||
run: python setup.py sdist bdist_wheel | ||
|
||
- name: Upload build artifacts ⬆️ | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: dist | ||
path: dist/*.whl | ||
|
||
test-install: | ||
name: Test installation on ${{ matrix.os }} with ${{ matrix.manager }} for Python ${{ matrix.py }} | ||
runs-on: ${{ matrix.os }} | ||
needs: build-wheel | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
extras: ["", "[dev]"] | ||
manager: [pip, pipenv] | ||
os: [ubuntu-latest, windows-latest, macos-latest] | ||
py: [3.7, 3.8] | ||
|
||
steps: | ||
- uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.py }} | ||
|
||
- name: Update ${{ matrix.manager }} | ||
run: echo "${{ matrix.manager }}" | grep pipenv | xargs pip install --upgrade pip | ||
|
||
- name: Download build artifacts ⬇️ | ||
uses: actions/download-artifact@v2 | ||
with: | ||
name: dist | ||
|
||
- name: Install using ${{ matrix.manager }} | ||
run: ${{ matrix.manager }} install ./*.whl |