-
Notifications
You must be signed in to change notification settings - Fork 14
55 lines (47 loc) · 1.47 KB
/
build.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
name: Test
on: [push, pull_request]
jobs:
test:
runs-on: ${{ matrix.os }}
continue-on-error: ${{ matrix.experimental }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: [ '3.8', '3.9', '3.10']
experimental: [false]
include:
- os: ubuntu-latest
python-version: "3.11-dev"
experimental: true
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/[email protected]
with:
python-version: ${{ matrix.python-version }}
- name: Install and configure Poetry
uses: snok/install-poetry@v1
with:
version: latest
virtualenvs-create: false
virtualenvs-in-project: false
- name: Set up cache
uses: actions/[email protected]
with:
path: .venv
key: venv-${{ matrix.python-version }}-${{ hashFiles('pyproject.toml') }}-${{ hashFiles('poetry.lock') }}
- name: Install dependencies
run: |
poetry config virtualenvs.in-project true
poetry install
- name: Run safety checks and style check
run: |
poetry run pre-commit run --all-files
- name: Run tests
env:
FUND_FACTSHEET_KEY: ${{ secrets.FUND_FACTSHEET_KEY }}
FUND_DAILY_INFO_KEY: ${{ secrets.FUND_DAILY_INFO_KEY }}
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
run: |
poetry run pytest