main_ci #830
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: main_ci | |
on: | |
push: | |
pull_request: | |
schedule: | |
- cron: "0 2 * * 1-5" | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
max-parallel: 20 | |
matrix: | |
python-version: [3.7, 3.8, 3.9, '3.10', '3.11'] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: setup conda | |
uses: s-weigand/setup-conda@v1 | |
with: | |
update-conda: true | |
python-version: ${{ matrix.python-version }} | |
conda-channels: anaconda, conda-forge | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install pyomo numpy scipy coverage matplotlib pybind11 pytest | |
conda install openmpi pymumps ipopt --no-update-deps | |
pip install mpi4py | |
pyomo download-extensions | |
pyomo build-extensions | |
pip install -e ./ | |
- name: Test with nose | |
run: | | |
coverage run --source=. --rcfile=setup.cfg -m pytest -v -m "serial or (parallel and (one_proc or all_proc))" ./ | |
mpirun -np 2 -oversubscribe coverage run --source=. --rcfile=setup.cfg -m mpi4py -m pytest -v -m "parallel and (two_proc or all_proc)" ./ | |
mpirun -np 3 -oversubscribe coverage run --source=. --rcfile=setup.cfg -m mpi4py -m pytest -v -m "parallel and (three_proc or all_proc)" ./ | |
mpirun -np 4 -oversubscribe coverage run --source=. --rcfile=setup.cfg -m mpi4py -m pytest -v -m "parallel and (four_proc or all_proc)" ./ | |
coverage combine | |
coverage xml | |
coverage report -m | |
- name: upload coverage | |
uses: codecov/codecov-action@v3 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} |