forked from Coramin/Coramin
-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (46 loc) · 1.59 KB
/
main_ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
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 numpy scipy codecov coverage sympy networkx pybind11 gurobipy highspy pytest
conda install openmpi pymumps ipopt --no-update-deps
pip install mpi4py metis
pip install git+https://github.com/cog-imperial/suspect.git
pip install git+https://github.com/pyomo/pyomo.git
pip install git+https://github.com/grid-parity-exchange/Egret.git
pip install -e ./
- name: build pyomo extensions
run: |
pyomo download-extensions
pyomo build-extensions
- name: Test with nose
run: |
coverage run --source=. --rcfile=setup.cfg -m pytest -v --durations=0 -m "serial or (parallel and (one_proc or all_proc)) or not parallel" ./
mpirun -np 2 -oversubscribe coverage run --source=. --rcfile=setup.cfg -m mpi4py -m pytest -v -m "parallel and (two_proc or all_proc)" ./
coverage combine
coverage xml
coverage report -m
- name: upload coverage
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}