Doe categorical second attempt #581
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
name: Tests | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
testing_minimal: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: ['3.9', '3.10', '3.11' ] | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Minimal Bofire, Python ${{ matrix.python-version }} | |
run: pip install "." pytest | |
- name: Run domain-only test, Python ${{ matrix.python-version }} | |
run: | | |
pytest tests/bofire/data_models/test_domain.py \ | |
tests/bofire/data_models/test_base.py \ | |
tests/bofire/data_models/test_constraint_fulfillment.py \ | |
tests/bofire/data_models/test_constraints.py \ | |
tests/bofire/data_models/test_domain_validators.py \ | |
tests/bofire/data_models/test_features.py \ | |
tests/bofire/data_models/test_filters.py \ | |
tests/bofire/data_models/test_nchoosek_combinatorics.py \ | |
tests/bofire/data_models/test_numeric.py \ | |
tests/bofire/data_models/test_unions.py \ | |
tests/bofire/data_models/test_util.py | |
testing: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: [ '3.9', '3.11' ] | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: conda-incubator/setup-miniconda@v2 | |
with: | |
miniconda-version: "latest" | |
activate-environment: test | |
python-version: ${{ matrix.python-version }} | |
- name: Install Dependencies, Python ${{ matrix.python-version }} | |
shell: bash -l {0} | |
run: | | |
conda install -c conda-forge cyipopt | |
pip install ".[optimization,tests,cheminfo,xgb]" | |
- name: Run tests, Python ${{ matrix.python-version }} | |
shell: bash -l {0} | |
run: pytest -ra --cov=bofire --cov-report term-missing tests | |
- name: Run pip freeze, Python ${{ matrix.python-version }} | |
shell: bash -l {0} | |
run: pip freeze | |
testing_against_latest_botorch: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: conda-incubator/setup-miniconda@v2 | |
with: | |
miniconda-version: "latest" | |
activate-environment: test | |
python-version: '3.10' | |
- name: Install Dependencies | |
shell: bash -l {0} | |
run: | | |
conda install -c conda-forge cyipopt | |
pip install --upgrade git+https://github.com/cornellius-gp/linear_operator.git | |
pip install --upgrade git+https://github.com/cornellius-gp/gpytorch.git | |
export ALLOW_LATEST_GPYTORCH_LINOP=true | |
pip install --upgrade git+https://github.com/pytorch/botorch.git | |
pip install ".[optimization,tests,cheminfo,xgb]" | |
- name: Run tests, Python ${{ matrix.python-version }} | |
shell: bash -l {0} | |
run: pytest -ra --cov=bofire --cov-report term-missing tests | |
- name: Run pip freeze, Python ${{ matrix.python-version }} | |
shell: bash -l {0} | |
run: pip freeze | |
testing_tutorials: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: conda-incubator/setup-miniconda@v2 | |
with: | |
miniconda-version: "latest" | |
activate-environment: test | |
python-version: '3.10' | |
- name: Install Dependencies | |
shell: bash -l {0} | |
run: | | |
conda install -c conda-forge cyipopt | |
pip install ".[optimization,tests,cheminfo,xgb]" | |
- name: Run notebooks | |
shell: bash -l {0} | |
run: python scripts/run_tutorials.py -p "$(pwd)" | |