Skip to content

Commit

Permalink
[#34] WIP: add usage workflow
Browse files Browse the repository at this point in the history
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
bryant-finney committed Nov 21, 2021
1 parent 38674f8 commit c78251e
Showing 1 changed file with 61 additions and 0 deletions.
61 changes: 61 additions & 0 deletions .github/workflows/usage.yml
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

0 comments on commit c78251e

Please sign in to comment.