forked from mljar/mljar-supervised
-
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.
added dispatch workflow to test contribution installation options.
- Loading branch information
1 parent
44ea44e
commit f7612bb
Showing
1 changed file
with
72 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,72 @@ | ||
name: Contributor install test | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
python-version: | ||
description: 'Python version' | ||
required: true | ||
default: '3.11' | ||
options: | ||
- '3.8' | ||
- '3.9' | ||
- '3.10' | ||
- '3.11' | ||
os: | ||
description: 'Operating System' | ||
required: true | ||
default: 'ubuntu-latest' | ||
options: | ||
- 'ubuntu-latest' | ||
- 'macos-latest' | ||
- 'windows-latest' | ||
method: | ||
description: 'Method install python dependencies can be venv or poetry' | ||
required: true | ||
default: 'venv' | ||
options: | ||
- 'venv' | ||
- 'poetry' | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ${{ github.event.inputs.os }} | ||
|
||
|
||
steps: | ||
- name: Install OS Dependencies | ||
if: ${{ github.event.inputs.os }} == 'ubuntu-latest' | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get -y install graphviz | ||
- name: Install OS Dependencies | ||
if: ${{ github.event.inputs.os }} == 'macos-latest' | ||
run: | | ||
brew install graphviz | ||
- name: Install OS Dependencies | ||
if: ${{ github.event.inputs.os }} == 'windows-latest' | ||
run: | | ||
choco install graphviz | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python ${{ github.event.inputs.python-version }} | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ github.event.inputs.python-version }} | ||
- name: Install dependencies traditionally with virtualenv | ||
if: ${{ github.event.inputs.method }} == 'venv' | ||
run: | | ||
virtualenv venv | ||
source venv/bin/activate | ||
pip install -r requirements.txt | ||
pip install -r requirements_dev.txt | ||
pytest | ||
- name: Install dependencies with poetry | ||
if: ${{ github.event.inputs.method }} == 'poetry' | ||
run: | | ||
pip install poetry | ||
poetry install | ||
poetry run pytest | ||
continue-on-error: true |