-
Notifications
You must be signed in to change notification settings - Fork 32
53 lines (53 loc) · 1.69 KB
/
ci.yml
File metadata and controls
53 lines (53 loc) · 1.69 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
name: Testing
on:
push:
branches: [main, develop]
pull_request:
branches: [main, develop]
schedule:
- cron: 0 0 * * MON
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.11', '3.13']
optional: [false]
include:
- python-version: '3.11'
optional: true
steps:
- uses: actions/checkout@v6
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
env:
SKLEARN_ALLOW_DEPRECATED_SKLEARN_PACKAGE_INSTALL: true
run: |
sudo apt-get update && sudo apt-get install -y libglpk-dev glpk-utils coinor-cbc
python -m pip install --upgrade pip
if [ "${{ matrix.optional }}" = "true" ]; then
pip install ".[develop]"
else
pip install ".[develop]"
fi
- name: Create env file
run: |
touch .env
- name: Run unit tests
run: |
pytest . -m unit --cov=h2integrate --cov-report=xml:unit-coverage.xml
- name: Run regression tests
run: |
pytest . -m regression --cov=h2integrate --cov-report=xml:regression-coverage.xml
- name: Run integration tests
run: |
pytest . -m integration --cov=h2integrate --cov-report=xml:integration-coverage.xml
- name: Upload unit coverage to
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: unit-coverage.xml, regression-coverage.xml, integration-coverage.xml
flags: unit,regression,integration