-
Notifications
You must be signed in to change notification settings - Fork 0
57 lines (45 loc) · 1.4 KB
/
Copy pathci.yml
File metadata and controls
57 lines (45 loc) · 1.4 KB
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
name: CI
on:
push:
branches: [develop, master]
pull_request:
branches: [develop]
jobs:
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 (in editable mode to measure coverage)
run: pip install -e ./ --verbose
- name: Install test dependencies
run: pip install scipy coverage
- name: Execute tests and generate code coverage data
run: |
python -m coverage run --source ./pylanczos/ -m unittest discover ./test -v
python -m coverage report
python -m coverage xml
- name: Upload coverage data to Codecov
if: ${{ matrix.os == 'ubuntu-latest' }}
uses: codecov/codecov-action@v6
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true