add test coverage
parent
2c5356f640
commit
2e49bc0499
|
@ -0,0 +1,33 @@
|
|||
name: codecov
|
||||
on: [push]
|
||||
jobs:
|
||||
run:
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ubuntu-latest, macos-latest, windows-latest]
|
||||
env:
|
||||
OS: ${{ matrix.os }}
|
||||
PYTHON: '3.11'
|
||||
steps:
|
||||
- uses: actions/checkout@master
|
||||
- name: Setup Python
|
||||
uses: actions/setup-python@master
|
||||
with:
|
||||
python-version: 3.11
|
||||
- name: Generate coverage report
|
||||
run: |
|
||||
pip install pytest
|
||||
pip install pytest-cov
|
||||
pytest --cov=./ --cov-report=xml
|
||||
- name: Upload coverage to Codecov
|
||||
uses: codecov/codecov-action@v3
|
||||
with:
|
||||
token: ${{ secrets.CODECOV_TOKEN }}
|
||||
directory: ./coverage/reports/
|
||||
env_vars: OS,PYTHON
|
||||
fail_ci_if_error: true
|
||||
files: ./coverage1.xml,./coverage2.xml,!./cache
|
||||
flags: unittests
|
||||
name: codecov-umbrella
|
||||
verbose: true
|
|
@ -13,6 +13,9 @@ jobs:
|
|||
matrix:
|
||||
os: [ubuntu-latest, macos-latest, windows-latest]
|
||||
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
|
||||
exclude:
|
||||
- os: macos-latest
|
||||
python-version: "3.7"
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Set up Python ${{ matrix.python-version }}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
FROM python:3.8-slim-buster
|
||||
FROM python:3.11-slim-buster
|
||||
|
||||
WORKDIR pypfopt
|
||||
COPY requirements.txt .
|
||||
|
|
Loading…
Reference in New Issue