-
Notifications
You must be signed in to change notification settings - Fork 13
77 lines (74 loc) · 2.35 KB
/
ci.yml
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
name: CI
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
workflow_dispatch:
jobs:
linter-check:
name: Lint code
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
# Full git history is needed to get a proper
# list of changed files within `super-linter`
fetch-depth: 0
- name: Lint code
uses: github/super-linter/slim@v4
env:
LINTER_RULES_PATH: .
DEFAULT_BRANCH: master
VALIDATE_ALL_CODEBASE: false
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
FILTER_REGEX_INCLUDE: ./pymultifracs/*.py
VALIDATE_PYTHON_FLAKE8: true
VALIDATE_PYTHON_PYLINT: true
test-suite:
defaults:
run:
shell: bash -el {0}
runs-on: ${{ matrix.os }}
needs: linter-check
strategy:
fail-fast: true
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ["3.10", "3.11"]
steps:
- uses: actions/checkout@v4
- name: Get Date
id: get-date
run: echo "today=$(/bin/date -u '+%Y%m%d')" >> $GITHUB_OUTPUT
shell: bash
# - name: Cache conda
# uses: actions/cache@v2
# env:
# CACHE_NUMBER: 0
# with:
# path: ~/conda_pkgs_dir
# key:
# ${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-${{
# hashFiles('env.yml') }}
- name: Setup python ${{ matrix.python-version }} with mamba
uses: conda-incubator/setup-miniconda@v3
with:
python-version: ${{ matrix.python-version }}
environment-file: meta.yml
activate-environment: pymultifracs
mamba-version: "*"
- name: Testing
run: |
mamba install numpy scipy pywavelets seaborn numba statsmodels pytest pytest-xdist pytest-cov tqdm joblib
pip install -e .[bootstrap,robust]
pytest -n auto -x --cov=./ --cov-report=xml
- name: Upload coverage
if: ${{ matrix.os == 'ubuntu-latest' && matrix.python-version == '3.11' }}
uses: codecov/codecov-action@v3
with:
files: ./coverage.xml # optional
name: codecov-umbrella # optional
fail_ci_if_error: false # optional (default = false)
verbose: true # optional (default = false)