Skip to content

Codecov CI updated

Codecov CI updated #49

Workflow file for this run

name: CI
on:
push:
branches: [develop, master]
pull_request:
branches: [develop]
jobs:
# This workflow contains a single job called "build"
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
steps:
- uses: actions/checkout@v6
with:
submodules: recursive
- name: Set up Python 3.14
uses: actions/setup-python@v6
with:
python-version: "3.14"
- name: Prepare venv
run: |
pip install --upgrade pip
python -m venv venv
- name: Activate venv (Linux)
if: ${{ matrix.os == 'ubuntu-latest' }}
run: source ./venv/bin/activate
- name: Activate venv (Windows)
if: ${{ matrix.os == 'windows-latest' }}
run: .\venv\Scripts\activate.ps1
- name: Install library
run: pip install . --verbose
- name: Install test dependencies
run: pip install scipy coverage
- name: Execute tests and generate code coverage data
run: |
cd test
coverage run --source ../pylanczos/ -m unittest discover ./ -v
coverage xml
- name: Upload coverage data to Codecov
if: ${{ matrix.os == 'ubuntu-latest' }}
uses: codecov/codecov-action@v6
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./test/coverage.xml
disable_search: true
fail_ci_if_error: true