-
Notifications
You must be signed in to change notification settings - Fork 0
90 lines (85 loc) · 2.59 KB
/
Copy pathci.yml
File metadata and controls
90 lines (85 loc) · 2.59 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
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
78
79
80
81
82
83
84
85
86
87
88
89
90
name: CI
on:
push:
branches: [main]
pull_request:
permissions:
contents: read
jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.11", "3.12", "3.13"]
steps:
- uses: actions/checkout@v7
- uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
cache: pip
- run: python -m pip install --upgrade pip
- run: python -m pip install -e '.[dev,ccxt,release]'
- run: ruff check .
- run: mypy src
- run: pytest
- if: matrix.python-version == '3.13'
run: python -m build
- if: matrix.python-version == '3.13'
run: python -m twine check --strict dist/*
docker:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: actions/setup-python@v6
with:
python-version: "3.13"
cache: pip
- run: python -m pip install -e '.[dev]'
- run: PINEFORGE_DOCKER_TEST=1 pytest tests/test_docker_integration.py
database-e2e:
runs-on: ubuntu-latest
services:
mysql:
image: mysql:8.4
env:
MYSQL_DATABASE: pineforge
MYSQL_USER: pineforge
MYSQL_PASSWORD: pineforge
MYSQL_ROOT_PASSWORD: pineforge-root
ports:
- 3306:3306
options: >-
--health-cmd="mysqladmin ping --host=127.0.0.1 --user=pineforge --password=pineforge --silent"
--health-interval=2s
--health-timeout=5s
--health-retries=30
--health-start-period=15s
postgres:
image: postgres:17
env:
POSTGRES_DB: pineforge
POSTGRES_USER: pineforge
POSTGRES_PASSWORD: pineforge
ports:
- 5432:5432
options: >-
--health-cmd="pg_isready --username=pineforge --dbname=pineforge"
--health-interval=2s
--health-timeout=5s
--health-retries=30
--health-start-period=10s
env:
PINEFORGE_DATABASE_E2E: "1"
PINEFORGE_CORPUS_OHLCV: tests/fixtures/corpus_ohlcv_ETH-USDT-USDT_1m_sample.csv
PINEFORGE_MYSQL_URL: mysql+pymysql://pineforge:pineforge@127.0.0.1:3306/pineforge
PINEFORGE_POSTGRES_URL: postgresql+psycopg://pineforge:pineforge@127.0.0.1:5432/pineforge
steps:
- uses: actions/checkout@v7
- uses: actions/setup-python@v6
with:
python-version: "3.13"
cache: pip
- run: python -m pip install --upgrade pip
- run: python -m pip install -e '.[dev,database-e2e]'
- run: pytest tests/test_database_e2e.py