-
Notifications
You must be signed in to change notification settings - Fork 5
58 lines (48 loc) · 1.57 KB
/
ci.yaml
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
name: CI
on:
push:
branches: [master, v0.*]
pull_request:
branches: master
schedule:
- cron: '0 6 * * 1,4' # Each Monday and Thursday at 06:00 UTC
workflow_dispatch:
env:
NB_KERNEL: python
MPLBACKEND: Agg
WATEX_DATA: ${{ github.workspace }}/watex-data
jobs:
run-tests:
runs-on: ubuntu-latest
strategy:
matrix:
python: ["3.9", "3.10"]
install: [full]
deps: [latest]
include:
- python: "3.9"
install: full
deps: pinned
- python: "3.10"
install: light
deps: pinned
steps:
- uses: actions/checkout@v4
- name: Setup Python ${{ matrix.python }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install flake8 pytest pytest-cov
if [[ ${{matrix.install}} == 'full' ]]; then pip install -r docs/requirements.txt; fi
if [[ ${{matrix.deps }} == 'pinned' ]]; then pip install -r ci/deps_pinned.txt; fi
- name: Run unit tests with pytest and code coverage with coverage.py
run: |
pytest tests -v --cov=tests/ --cov-config=.coveragerc --cov-report lcov:tests/lcov.info --cov-fail-under=60
- name: Upload Coverage Results
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.github_token }}
path-to-lcov: tests/lcov.info