-
Notifications
You must be signed in to change notification settings - Fork 36
95 lines (95 loc) · 2.76 KB
/
ci.yml
File metadata and controls
95 lines (95 loc) · 2.76 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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
name: Testing
on:
pull_request:
branches:
- main
- develop
types:
- opened
- ready_for_review
- review_requested
- enqueued
paths:
- h2integrate/**.py
schedule:
- cron: 0 0 * * MON
jobs:
build:
strategy:
matrix:
os:
- ubuntu-latest
# - windows-latest # Temporarily disabled
python-version:
- '3.11'
- '3.13'
test-type:
- unit
- regression
- integration
optional:
- true
include:
- python-version: '3.11'
optional: false
os: ubuntu-latest
test-type: unit
- python-version: '3.11'
optional: false
os: ubuntu-latest
test-type: regression
- python-version: '3.11'
optional: false
os: ubuntu-latest
test-type: integration
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v6
- name: Set up Python ${{ matrix.python-version }}
uses: conda-incubator/setup-miniconda@v3
with:
miniconda-version: latest
auto-update-conda: true
python-version: ${{ matrix.python-version }}
auto-activate: true
activate-environment: h2integrate
- name: Install base dependencies
shell: bash -el {0}
env:
SKLEARN_ALLOW_DEPRECATED_SKLEARN_PACKAGE_INSTALL: true
run: |
conda install -y -c conda-forge glpk coin-or-cbc>=2.10.12
python -m pip install --upgrade pip
pip install ".[develop]"
- if: ${{ matrix.optional }}
name: Install optional dependencies
shell: bash -el {0}
run: |
conda install -y -c conda-forge wisdem
pip install ".[extras]"
- name: Create env file
run: |
touch .env
- name: Run ${{ matrix.test-type }} tests
shell: bash -el {0}
run: pytest . -m ${{ matrix.test-type }} --cov=h2integrate --cov-report=lcov:./${{ matrix.test-type }}-coverage.lcov
- name: Upload test coverage
uses: coverallsapp/github-action@v2
if: contains(matrix.os, 'ubuntu') && contains(matrix.python-version, '3.13')
with:
github-token: ${{ secrets.COVERALLS_REPO_TOKEN }}
files: ./${{ matrix.test-type }}-coverage.lcov
flag-name: ${{ matrix.test-type }}
parallel: true
fail-on-error: false
coverage-finish:
needs: build
if: always()
runs-on: ubuntu-latest
steps:
- name: Coveralls finished
uses: coverallsapp/github-action@v2
with:
github-token: ${{ secrets.COVERALLS_REPO_TOKEN }}
parallel-finished: true
fail-on-error: false