-
Notifications
You must be signed in to change notification settings - Fork 257
67 lines (53 loc) · 1.85 KB
/
test.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: Test
# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
on: [push, pull_request]
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
#doc-str:
# runs-on: ubuntu-latest
#
# steps:
# - uses: actions/checkout@v3
#
# - name: Set up Python 3.10
# uses: actions/setup-python@v4
# with:
# python-version: '3.10'
#
# - name: install docstr
# run: |
# pip install docstr-coverage
# docstr-coverage cvxportfolio
test:
# The type of runner that the job will run on
runs-on: ubuntu-latest
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
python-version: ['3.9', '3.10', '3.11']
# Steps represent matrix sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Setup environment
run: python -m venv env
# - name: Old versions for py 3.10
# if: ${{ matrix.python-version == '3.10'}}
# run: env/bin/python -m pip install cvxpy==1.2.3
- name: Install other dependencies
run: |
env/bin/python -m pip install .
env/bin/python -m pip install coverage
- name: Run tests
run: |
env/bin/coverage run -m unittest cvxportfolio/tests/*.py
env/bin/coverage lcov
- name: Coveralls GitHub Action
uses: coverallsapp/github-action@v1
with:
path-to-lcov: coverage.lcov