|
8 | 8 | build:
|
9 | 9 | name: Build
|
10 | 10 | runs-on: ubuntu-18.04
|
11 |
| - |
12 | 11 | strategy:
|
13 | 12 | matrix:
|
14 |
| - python-version: [3.7, 3.8] |
| 13 | + python-version: [3.7, '3.10'] |
15 | 14 | include:
|
16 | 15 | - python-version: 3.9
|
17 | 16 | test-type: lint
|
18 | 17 | - python-version: 3.9
|
19 | 18 | test-type: docs
|
20 | 19 |
|
21 | 20 | steps:
|
22 |
| - - name: Set up Python ${{ matrix.python-version }} |
23 |
| - uses: actions/setup-python@v2 |
| 21 | + - uses: actions/setup-python@v4 |
24 | 22 | with:
|
25 | 23 | python-version: ${{ matrix.python-version }}
|
26 |
| - |
27 |
| - - uses: actions/cache@v2 |
28 |
| - name: Set up caches |
| 24 | + - uses: actions/cache@v3 |
29 | 25 | with:
|
30 | 26 | path: ~/.cache/pip
|
31 | 27 | key: ${{ runner.os }}-py${{ matrix.python-version }}
|
32 |
| - |
33 |
| - - name: Checkout repo |
34 |
| - uses: actions/checkout@v2 |
| 28 | + - uses: actions/checkout@v3 |
35 | 29 | with:
|
36 | 30 | fetch-depth: 3
|
37 | 31 | - name: Fetch tags
|
38 | 32 | run: git fetch --depth=1 origin +refs/tags/*:refs/tags/*
|
39 | 33 |
|
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' |
55 | 46 | 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) |
61 | 50 |
|
62 |
| - - name: Test |
63 |
| - if: '! matrix.test-type' |
| 51 | + - if: '! matrix.test-type' |
64 | 52 | env: { BOKEH_BROWSER: none }
|
65 | 53 | run: time catchsegv python -m backtesting.test
|
66 | 54 |
|
67 |
| - - name: Test docs |
68 |
| - if: matrix.test-type == 'docs' |
| 55 | + - if: matrix.test-type == 'docs' |
69 | 56 | run: time catchsegv doc/build.sh
|
0 commit comments