forked from grid-parity-exchange/Prescient
-
Notifications
You must be signed in to change notification settings - Fork 0
72 lines (67 loc) · 2.1 KB
/
main_tests.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
68
69
70
71
72
name: GitHub CI
on:
# Trigger the workflow on push or pull request,
# but only for the main branch
push:
branches:
- main
pull_request:
branches:
- main
# nightly tests at 8:00 UTC
schedule:
- cron: '0 8 * * *'
workflow_dispatch:
types: run-test
defaults:
run:
shell: bash -l {0}
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
python-version: [3.7, 3.8, 3.9]
include:
- os: macos-latest
python-version: 3.7
- os: windows-latest
python-version: 3.7
steps:
- uses: actions/checkout@v2
- uses: conda-incubator/setup-miniconda@v2
with:
activate-environment: test_env
environment-file: environment.yml
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 coincbc==2.10.5
fi
# test cbc executable
cbc -quit
- name: Install EGRET
# don't install if this is a tag
# use the version specified in setup.py
if: ${{!startsWith(github.ref, 'refs/tags')}}
run: |
pip install git+https://github.com/grid-parity-exchange/Egret.git
- name: Install Prescient
run: |
python setup.py develop
- name: Run Prescient Simulator Tests
run: |
pytest -v prescient/simulator/tests/test_simulator.py