-
Notifications
You must be signed in to change notification settings - Fork 15
40 lines (40 loc) · 1.1 KB
/
dca_tests.yml
File metadata and controls
40 lines (40 loc) · 1.1 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
name: DCA tests
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
run-tests:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10"]
steps:
- name: Test DCA
uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
if [ -f requirements.txt ]; then python -m pip install -r requirements.txt; fi
python -m pip install flake8 codecov pytest-cov sphinx_rtd_theme
python -m pip install -e .
- name: Lint with flake8
run: |
python -m flake8 src/dca tests --exit-zero
- name: Test with pytest
run: |
python -m pytest -sv --cov=./ tests
- name: Build docs
run: |
sphinx-build -W -b html docs/source docs/build
- name: Codecov
run: |
python -m codecov