Skip to content

Commit be1d8be

Browse files
committed
CI: Refresh ci.yml
1 parent 57a9f32 commit be1d8be

File tree

2 files changed

+22
-35
lines changed

2 files changed

+22
-35
lines changed

.github/workflows/ci.yml

+21-34
Original file line numberDiff line numberDiff line change
@@ -8,62 +8,49 @@ jobs:
88
build:
99
name: Build
1010
runs-on: ubuntu-18.04
11-
1211
strategy:
1312
matrix:
14-
python-version: [3.7, 3.8]
13+
python-version: [3.7, '3.10']
1514
include:
1615
- python-version: 3.9
1716
test-type: lint
1817
- python-version: 3.9
1918
test-type: docs
2019

2120
steps:
22-
- name: Set up Python ${{ matrix.python-version }}
23-
uses: actions/setup-python@v2
21+
- uses: actions/setup-python@v4
2422
with:
2523
python-version: ${{ matrix.python-version }}
26-
27-
- uses: actions/cache@v2
28-
name: Set up caches
24+
- uses: actions/cache@v3
2925
with:
3026
path: ~/.cache/pip
3127
key: ${{ runner.os }}-py${{ matrix.python-version }}
32-
33-
- name: Checkout repo
34-
uses: actions/checkout@v2
28+
- uses: actions/checkout@v3
3529
with:
3630
fetch-depth: 3
3731
- name: Fetch tags
3832
run: git fetch --depth=1 origin +refs/tags/*:refs/tags/*
3933

40-
- name: Install dependencies
41-
run: |
42-
pip install -U pip setuptools wheel
43-
pip install -U --pre .[test]
44-
45-
- name: Install lint dependencies
46-
if: matrix.test-type == 'lint'
47-
run: pip install -U .[dev]
48-
49-
- name: Install docs dependencies
50-
if: matrix.test-type == 'docs'
51-
run: pip install -e .[doc,test] # -e provides _version.py for pdoc
52-
53-
- name: Test w/ Coverage, Lint
54-
if: matrix.test-type == 'lint'
34+
- run: pip install -U pip setuptools wheel
35+
- if: matrix.test-type == 'lint'
36+
run: pip install -U --pre bokeh pandas numpy && pip install -U .[dev]
37+
- if: matrix.test-type == 'docs'
38+
run: pip install -e .[doc] # -e provides _version.py for pdoc
39+
- run: pip install -U .[test]
40+
41+
- if: matrix.test-type == 'lint'
42+
run: flake8
43+
- if: matrix.test-type == 'lint'
44+
run: mypy backtesting
45+
- if: matrix.test-type == 'lint'
5546
env: { BOKEH_BROWSER: none }
56-
run: |
57-
flake8
58-
mypy backtesting
59-
time catchsegv coverage run -m backtesting.test
60-
bash <(curl -s https://codecov.io/bash)
47+
run: time catchsegv coverage run -m backtesting.test
48+
- if: matrix.test-type == 'lint'
49+
run: bash <(curl -s https://codecov.io/bash)
6150

62-
- name: Test
63-
if: '! matrix.test-type'
51+
- if: '! matrix.test-type'
6452
env: { BOKEH_BROWSER: none }
6553
run: time catchsegv python -m backtesting.test
6654

67-
- name: Test docs
68-
if: matrix.test-type == 'docs'
55+
- if: matrix.test-type == 'docs'
6956
run: time catchsegv doc/build.sh

doc/build.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ jupytext --test --update --to ipynb "$DOCROOT/examples"/*.py
4747
cp -f "$DOCROOT/scripts/ipython_config.py" ~/.ipython/profile_default/startup/99-backtesting-docs.py
4848
trap 'rm -f ~/.ipython/profile_default/startup/99-backtesting-docs.py' EXIT; }
4949
PYTHONWARNINGS='ignore::UserWarning,ignore::RuntimeWarning' \
50-
jupyter-nbconvert --execute --to=html \
50+
time jupyter-nbconvert --execute --to=html \
5151
--ExecutePreprocessor.timeout=300 \
5252
--output-dir="$BUILDROOT/examples" "$DOCROOT/examples"/*.ipynb
5353

0 commit comments

Comments
 (0)