Skip to content

gh test.yml experimenting #347

gh test.yml experimenting

gh test.yml experimenting #347

Workflow file for this run

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:
test:
# The type of runner that the job will run on
runs-on: ${{ matrix.os }}
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: 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 package
run: |
pip install .
pip install coverage
- name: Run tests with coverage
run: |
coverage run -m unittest cvxportfolio/tests/*.py
coverage lcov
- name: Coveralls GitHub Action
uses: coverallsapp/github-action@v1
with:
path-to-lcov: coverage.lcov