Create testpypi.yml #4
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
# This is a basic workflow to help you get started with Actions | |
name: Build | |
# Controls when the workflow will run | |
on: [push] | |
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | |
jobs: | |
# job to build CEM on python 3.6. | |
build-cem-on-py36: | |
# The type of runner that the job will run on | |
runs-on: "${{ matrix.os }}" | |
strategy: | |
matrix: | |
#os: [ubuntu-18.04, ubuntu-latest, macos-latest, windows-latest] | |
os: [ubuntu-20.04, macos-latest, windows-latest] | |
python-version: ["3.6"] | |
# Steps represent a sequence of tasks that will be executed as part of the job | |
steps: | |
- name: Step 1 - checkout aix360 repository | |
uses: actions/checkout@v3 | |
- name: Step 2 - set up python version | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "${{ matrix.python-version }}" | |
- name: Step 3 - upgrade setuptools | |
run: pip3 install pytest nbmake wheel --upgrade setuptools | |
- name: Step 4 - Install aix360 with contrastive (CEM) | |
run: python -m pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple aix360['contrastive']==0.3.10 | |
# - name: Step 5 - Test CEM MAF | |
# run: python ./tests/contrastive/test_CEM_MAF.py | |
- name: Step 6 - Test CEM | |
run: python ./tests/contrastive/test_CEM.py | |
# job to build default: ted algorithm on python 3.10. | |
build-ted-on-py310: | |
# The type of runner that the job will run on | |
runs-on: "${{ matrix.os }}" | |
strategy: | |
matrix: | |
#os: [ubuntu-18.04, ubuntu-latest, macos-latest, windows-latest] | |
os: [ubuntu-latest, macos-latest, windows-latest] | |
python-version: ["3.10"] | |
# Steps represent a sequence of tasks that will be executed as part of the job | |
steps: | |
- name: Step 1 - checkout aix360 repository | |
uses: actions/checkout@v3 | |
- name: Step 2 - set up python version | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "${{ matrix.python-version }}" | |
- name: Step 3 - upgrade setuptools | |
run: pip3 install pytest nbmake wheel setuptools | |
- name: Step 4 - Install aix360 | |
run: python -m pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple aix360['ted']==0.3.10 | |
- name: Step 5 - Test TED | |
run: python ./tests/ted/test_TED_Cartesian.py | |
# job to build default: ted algorithm on python 3.10. | |
build-rule_induction-on-py310: | |
# The type of runner that the job will run on | |
runs-on: "${{ matrix.os }}" | |
strategy: | |
matrix: | |
#os: [ubuntu-18.04, ubuntu-latest, macos-latest, windows-latest] | |
os: [ubuntu-20.04, macos-latest, windows-latest] | |
python-version: ["3.10"] | |
# Steps represent a sequence of tasks that will be executed as part of the job | |
steps: | |
- name: Step 1 - checkout aix360 repository | |
uses: actions/checkout@v3 | |
- name: Step 2 - set up python version | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "${{ matrix.python-version }}" | |
- name: Step 3 - upgrade setuptools | |
run: pip3 install pytest nbmake wheel --upgrade setuptools | |
- name: Step 4 - Install aix360. (Default installs ted algorithm related dependencies) | |
run: python -m pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple aix360['rule_induction']==0.3.10 | |
- name: Step 5 - Test rule_induction | |
run: python -m unittest discover -s ./tests/rule_induction | |
# job to build dipvae algorithm on python 3.10. | |
build-dipvae-on-py310: | |
# The type of runner that the job will run on | |
runs-on: "${{ matrix.os }}" | |
strategy: | |
matrix: | |
#os: [ubuntu-20.04, ubuntu-latest, macos-latest, windows-latest] | |
os: [ubuntu-20.04, macos-latest, windows-latest] | |
python-version: ["3.10"] | |
# Steps represent a sequence of tasks that will be executed as part of the job | |
steps: | |
- name: Step 1 - checkout aix360 repository | |
uses: actions/checkout@v3 | |
- name: Step 2 - set up python version | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "${{ matrix.python-version }}" | |
- name: Step 3 - upgrade setuptools | |
run: pip3 install pytest nbmake wheel --upgrade setuptools | |
- name: Step 4 - Install aix360 with dipvae algorithm related dependencies | |
run: python -m pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple aix360['dipvae']==0.3.10 | |
- name: Step 5 - Test DIPVAE | |
run: python ./tests/dipvae/test_DIPVAE.py | |
# # job to build cofrnet algorithm on python 3.10. | |
build-cofrnet-on-py310: | |
# The type of runner that the job will run on | |
runs-on: "${{ matrix.os }}" | |
strategy: | |
matrix: | |
#os: [ubuntu-18.04, ubuntu-latest, macos-latest, windows-latest] | |
os: [ubuntu-20.04, macos-latest, windows-latest] | |
python-version: ["3.10"] | |
# Steps represent a sequence of tasks that will be executed as part of the job | |
steps: | |
- name: Step 1 - checkout aix360 repository | |
uses: actions/checkout@v3 | |
- name: Step 2 - set up python version | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "${{ matrix.python-version }}" | |
- name: Step 3 - upgrade setuptools | |
run: pip3 install pytest nbmake wheel --upgrade setuptools | |
- name: Step 4 - Install aix360 with cofrnet algorithm related dependencies | |
run: python -m pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple aix360['cofrnet']==0.3.10 | |
- name: Step 5 - Test CoFrNet | |
run: python ./tests/cofrnet/cofrnet_test.py | |
- name: Step 6 - Test CoFrNet Notebook | |
run: pytest --nbmake ./examples/cofrnet/cofrnet_example.ipynb | |
# job to build protodash algorithm on python 3.10. | |
build-protodash-on-py310: | |
# The type of runner that the job will run on | |
runs-on: "${{ matrix.os }}" | |
strategy: | |
matrix: | |
#os: [ubuntu-18.04, ubuntu-latest, macos-latest, windows-latest] | |
os: [ubuntu-20.04, macos-latest, windows-latest] | |
python-version: ["3.10"] | |
# Steps represent a sequence of tasks that will be executed as part of the job | |
steps: | |
- name: Step 1 - checkout aix360 repository | |
uses: actions/checkout@v3 | |
- name: Step 2 - set up python version | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "${{ matrix.python-version }}" | |
- name: Step 3 - upgrade setuptools | |
run: pip3 install pytest nbmake wheel --upgrade setuptools | |
- name: Step 4 - Install aix360 with protodash algorithm related dependencies | |
run: python -m pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple aix360['protodash']==0.3.10 | |
- name: Step 5 - Test Protodash | |
run: python ./tests/protodash/test_PDASH.py | |
# job to build rbm algorithm on python 3.10. | |
build-rbm-on-py310: | |
# The type of runner that the job will run on | |
runs-on: "${{ matrix.os }}" | |
strategy: | |
matrix: | |
os: [ubuntu-20.04, macos-latest, windows-latest] | |
#os: [macos-latest] | |
python-version: ["3.10"] | |
# Steps represent a sequence of tasks that will be executed as part of the job | |
steps: | |
- name: Step 1 - checkout aix360 repository | |
uses: actions/checkout@v3 | |
- name: Step 2 - set up python version | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "${{ matrix.python-version }}" | |
- name: Step 3 - upgrade setuptools | |
run: pip3 install pytest nbmake cmake wheel setuptools | |
- name: Step 4 - Install aix360 with rbm algorithm related dependency | |
run: python -m pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple aix360['rbm']==0.3.10 | |
- name: Step 5 - Test BRCG | |
run: python ./tests/rbm/test_Boolean_Rule_CG.py | |
- name: Step 6 - Test Linear Rule Regression | |
run: python ./tests/rbm/test_Linear_Rule_Regression.py | |
- name: Step 7 - Test Logistic Rule Regression | |
run: python ./tests/rbm/test_Logistic_Rule_Regression.py | |
# job to build nncontrastive algorithm on python 3.10. | |
build-nncontrastive-on-py310: | |
# The type of runner that the job will run on | |
runs-on: "${{ matrix.os }}" | |
strategy: | |
matrix: | |
os: [ubuntu-20.04, macos-latest, windows-latest] | |
python-version: ["3.10"] | |
# Steps represent a sequence of tasks that will be executed as part of the job | |
steps: | |
- name: Step 1 - checkout aix360 repository | |
uses: actions/checkout@v3 | |
- name: Step 2 - set up python version | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "${{ matrix.python-version }}" | |
- name: Step 3 - upgrade setuptools | |
run: pip3 install pytest nbmake wheel --upgrade setuptools | |
- name: Step 4 - Install aix360 with nncontrastive algorithm related dependencies | |
run: python -m pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple aix360['nncontrastive']==0.3.10 | |
- name: Step 5 - Test NearestNeighborContrastiveExplainer | |
run: python ./tests/nncontrastive/test_nncontrastive.py | |
# job to build tsice, tssaliency and tslime algorithms on python 3.10. | |
build-tsice-tssaliency-tslime-on-py310: | |
# The type of runner that the job will run on | |
runs-on: "${{ matrix.os }}" | |
strategy: | |
matrix: | |
os: [ubuntu-20.04, macos-latest, windows-latest] | |
python-version: ["3.10"] | |
# Steps represent a sequence of tasks that will be executed as part of the job | |
steps: | |
- name: Step 1 - checkout aix360 repository | |
uses: actions/checkout@v3 | |
- name: Step 2 - set up python version | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "${{ matrix.python-version }}" | |
- name: Step 3 - upgrade setuptools | |
run: pip3 install pytest cmake nbmake wheel | |
- name: Step 4 - Install aix360 with tsice algorithm related dependencies | |
run: python -m pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple aix360['tsice']==0.3.10 | |
- name: Step 5 - Test TSICEExplainer | |
run: python ./tests/tsice/test_tsice.py | |
# tssaliency deps are already satisfied. | |
- name: Step 6 - Test TSSaliencyExplainer | |
run: python ./tests/tssaliency/test_tssaliency.py | |
# tslime deps are already satisfied. | |
- name: Step 7 - Test TSLimeExplainer | |
run: python ./tests/tslime/test_tslime.py | |
build-imd-on-py38-310: | |
# The type of runner that the job will run on | |
runs-on: "${{ matrix.os }}" | |
strategy: | |
fail-fast: false | |
matrix: | |
# os: [ubuntu-18.04, ubuntu-latest, macos-latest, windows-latest] | |
os: [ubuntu-20.04] | |
python-version: ["3.10"] | |
# Steps represent a sequence of tasks that will be executed as part of the job | |
steps: | |
- name: Step 1 - checkout aix360 repository | |
uses: actions/checkout@v3 | |
- name: Step 2 - set up python version | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "${{ matrix.python-version }}" | |
- name: Step 3 - Install graphviz related things | |
run: sudo apt-get install python3-dev graphviz libgraphviz-dev pkg-config | |
- name: Step 4 - upgrade setuptools | |
run: pip3 install pytest nbmake wheel --upgrade setuptools | |
- name: Step 5 - Install aix360 with imd algorithm related dependencies | |
run: python -m pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple aix360['imd']==0.3.10 | |
- name: Step 5 - Test IMD | |
run: python ./tests/imd/test_imd.py | |
- name: Step 6 - Test IMD Notebook | |
run: pytest --nbmake ./examples/imd/imd_example.ipynb | |
build-imd-on-310-macos: | |
# The type of runner that the job will run on | |
runs-on: "${{ matrix.os }}" | |
strategy: | |
matrix: | |
os: [macos-latest] | |
python-version: ["3.10"] | |
# Steps represent a sequence of tasks that will be executed as part of the job | |
steps: | |
- name: Step 1 - checkout aix360 repository | |
uses: actions/checkout@v3 | |
- name: Step 2 - set up python version | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "${{ matrix.python-version }}" | |
- name: Step 3 - Install graphviz related things | |
run: brew install graphviz | |
- name: Step 4 - upgrade setuptools | |
run: pip3 install pytest nbmake wheel --upgrade setuptools | |
- name: Step 5 - Install aix360 with imd algorithm related dependencies | |
run: python -m pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple aix360['imd']==0.3.10 | |
- name: Step 5 - Test IMD | |
run: python ./tests/imd/test_imd.py | |
- name: Step 6 - Test IMD Notebook | |
run: pytest --nbmake ./examples/imd/imd_example.ipynb | |
# job to build groupedce algorithm on python 3.10. | |
build-groupedce-on-py310: | |
# The type of runner that the job will run on | |
runs-on: "${{ matrix.os }}" | |
strategy: | |
matrix: | |
os: [ubuntu-20.04, macos-latest, windows-latest] | |
python-version: ["3.10"] | |
# Steps represent a sequence of tasks that will be executed as part of the job | |
steps: | |
- name: Step 1 - checkout aix360 repository | |
uses: actions/checkout@v3 | |
- name: Step 2 - set up python version | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "${{ matrix.python-version }}" | |
- name: Step 3 - upgrade setuptools | |
run: pip3 install pytest nbmake wheel --upgrade setuptools | |
- name: Step 4 - Install aix360 with groupedce algorithm related dependencies | |
run: python -m pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple aix360['gce']==0.3.10 | |
- name: Step 5 - Test GroupedCEExplainer | |
run: python ./tests/gce/test_gce.py |