forked from grid-parity-exchange/Egret
-
Notifications
You must be signed in to change notification settings - Fork 1
67 lines (64 loc) · 2.04 KB
/
prescient.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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
name: EGRET Prescient CI
on:
# Trigger the workflow on push or pull request,
# but only for the main branch
push:
branches:
- main
pull_request:
branches:
- main
workflow_dispatch:
types: run-test
defaults:
run:
shell: bash -l {0}
jobs:
build:
name: Prescient main, ${{ matrix.os }}, Python ${{ matrix.python-version }}, Pyomo ${{ matrix.pyomo-version }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
python-version: [3.7]
pyomo-version: [6.4.0]
steps:
- uses: actions/checkout@v2
- uses: conda-incubator/setup-miniconda@v2
with:
activate-environment: test_env
python-version: ${{ matrix.python-version }}
auto-activate-base: false
- name: Conda Env
run: |
conda info
conda list
- name: Install CBC
run: |
if [ ${{ matrix.os }} = windows-latest ]
then
# download CBC binary, copy to place already in PATH
curl -O https://ampl.com/dl/open/cbc/cbc-win64.zip
unzip cbc-win64.zip
cp cbc.exe $CONDA_PREFIX
else
conda install -c conda-forge coincbc
fi
# test cbc executable
cbc -quit
- name: Install Pyomo
run: |
pip install git+https://github.com/Pyomo/pyomo.git@${{ matrix.pyomo-version }}
- name: Install EGRET
run: |
pip install -e .
- name: Install Prescient
run: |
cd ..
git clone --depth=1 https://github.com/grid-parity-exchange/Prescient.git
cd Prescient
pip install -e .
- name: Run Prescient Tests
run: |
cd ../Prescient
pytest -v prescient/simulator/tests/test_simulator.py