-
Notifications
You must be signed in to change notification settings - Fork 319
107 lines (90 loc) · 3.25 KB
/
ci.yaml
File metadata and controls
107 lines (90 loc) · 3.25 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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
NIXTLA_API_KEY: ${{ secrets.NIXTLA_DEV_API_KEY }}
NIXTLA_BASE_URL: ${{ secrets.NIXTLA_DEV_BASE_URL }}
NIXTLA_API_KEY_CUSTOM: ${{ secrets.NIXTLA_API_KEY_CUSTOM }}
NIXTLA_BASE_URL_CUSTOM: ${{ secrets.NIXTLA_BASE_URL_CUSTOM }}
API_KEY_FRED: ${{ secrets.API_KEY_FRED }}
jobs:
check-import:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.9", "3.10"]
steps:
- name: Clone repo
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Set up python
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # 5.6.0
with:
python-version: ${{ matrix.python-version }}
- name: Install nixtla
run: pip install uv && uv pip install --system .
- name: Check import
run: python -c "from nixtla import NixtlaClient"
run-notebooks-test:
needs: run-cross-platform-tests
runs-on: nixtla-linux-large-public
timeout-minutes: 60
strategy:
fail-fast: false
matrix:
python-version: ["3.9", "3.10"]
steps:
- name: Clone repo
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Set up python
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # 5.6.0
with:
python-version: ${{ matrix.python-version }}
- name: Install pip requirements
run: pip install uv && uv pip install --system ".[dev,distributed]"
- name: Run nbconvert
run: |
find nbs/docs/ -name "*.ipynb" -print0 | while IFS= read -r -d '' nb; do
echo "Running $nb..."
jupyter nbconvert --to notebook --execute --inplace "$nb"
done
run-local-tests: # dummy tests
runs-on: ${{ matrix.os }}
timeout-minutes: 60
strategy:
fail-fast: false
matrix:
os: [macos-13, windows-latest]
python-version: ["3.10"]
steps:
- name: Clone repo
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
run-cross-platform-tests:
runs-on: ${{ matrix.os }}
timeout-minutes: 60
strategy:
fail-fast: false
matrix:
os: [macos-14, ubuntu-latest, windows-latest]
python-version: ["3.9", "3.10"]
steps:
- name: Clone repo
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Set up python
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # 5.6.0
with:
python-version: ${{ matrix.python-version }}
- name: Install pip requirements
run: pip install uv && uv pip install --system ".[dev,distributed]"
- name: Run tests
if: runner.os != 'Windows'
run: pytest --cov=nixtla --reruns 3 --reruns-delay 10 --only-rerun ConnectError --only-rerun "Too Many Requests" nixtla_tests
- name: Run tests (Windows)
if: runner.os == 'Windows'
run: pytest --cov=nixtla -m "not distributed_run" --reruns 3 --reruns-delay 10 --only-rerun ConnectError --only-rerun "Too Many Requests" nixtla_tests