-
Notifications
You must be signed in to change notification settings - Fork 9
165 lines (157 loc) · 5.68 KB
/
ci.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
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
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
name: CI
on:
pull_request:
push:
branches:
- "main"
- "pre-commit-autoupdate"
- "update-pixi"
tags:
- "*"
schedule:
# daily (`@daily` not supported, see
# https://docs.github.com/en/actions/reference/events-that-trigger-workflows#scheduled-events )
#
# Runs on default/base branch (see
# https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#onschedule )
- cron: "0 0 * * *"
jobs:
pre-commit:
timeout-minutes: 30
runs-on: ubuntu-latest
steps:
- name: Checkout branch
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
- name: Set up pixi
uses: prefix-dev/setup-pixi@ba3bb36eb2066252b2363392b7739741bb777659 # v0.8.1
with:
environments: default lint
- name: pre-commit
run: pixi run pre-commit-run --color=always --show-diff-on-failure
tests:
strategy:
fail-fast: false
matrix:
numfocus_nightly: [false]
os: ["ubuntu-latest"]
pandas: [""]
pyarrow: ["4.0.1", "nightly"]
python: ["py311"]
include:
- numfocus_nightly: true
os: "ubuntu-latest"
pandas: ""
pyarrow: "nightly"
python: "py311"
- numfocus_nightly: false
os: "ubuntu-latest"
pandas: "1.5.3"
pyarrow: "13.0.0"
python: "py311"
- numfocus_nightly: false
os: "ubuntu-latest"
pandas: ""
pyarrow: "7.0.0"
python: "py311"
- numfocus_nightly: false
os: "ubuntu-latest"
pandas: ""
pyarrow: "8.0.1"
python: "py311"
- numfocus_nightly: false
os: "ubuntu-latest"
pandas: ""
pyarrow: "9.0.0"
python: "py311"
- numfocus_nightly: false
os: "ubuntu-latest"
pandas: ""
pyarrow: "10.0.1"
python: "py311"
- numfocus_nightly: false
os: "ubuntu-latest"
pandas: ""
pyarrow: "11.0.0"
python: "py311"
- numfocus_nightly: false
os: "ubuntu-latest"
pandas: ""
pyarrow: "12.0.0"
python: "py311"
- numfocus_nightly: false
os: "ubuntu-latest"
pandas: ""
pyarrow: "13.0.0"
python: "py311"
- numfocus_nightly: false
os: "ubuntu-latest"
pandas: ""
pyarrow: "13.0.0"
python: "py312"
- numfocus_nightly: false
os: "ubuntu-latest"
pandas: ""
pyarrow: "14.0.1"
python: "py312"
- numfocus_nightly: false
os: "ubuntu-latest"
pandas: ""
pyarrow: "15.0.0"
python: "py312"
- numfocus_nightly: false
os: "ubuntu-latest"
pandas: ""
pyarrow: "18.1.0"
python: "py312"
continue-on-error: ${{ matrix.numfocus_nightly || matrix.pyarrow == 'nightly' }}
runs-on: ${{ matrix.os }}
defaults:
run:
# see https://github.com/conda-incubator/setup-miniconda/#important
shell: bash -l {0}
steps:
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
- name: Set up pixi
uses: prefix-dev/setup-pixi@ba3bb36eb2066252b2363392b7739741bb777659 # v0.8.1
with:
environments: ${{ matrix.python }} # References the environments defined in pixi.toml
- name: Install Pyarrow (non-nightly)
run: pixi add pyarrow=${{ matrix.pyarrow }}
if: matrix.pyarrow != 'nightly' && matrix.pandas == ''
- name: Install Pyarrow (nightly)
# Install both arrow-cpp and pyarrow to make sure that we have the
# latest nightly of both packages. It is sadly not guaranteed that the
# nightlies and the latest release would otherwise work together.
# FIXME: The nightlies channel is currently empty: https://github.com/apache/arrow/issues/41856
run: pixi update arrow-cpp pyarrow
if: matrix.pyarrow == 'nightly'
- name: Install Pyarrow (downgrade pandas)
run: pixi add pyarrow==${{ matrix.pyarrow }} pandas==${{ matrix.pandas }}
if: matrix.pyarrow != 'nightly' && matrix.pandas != ''
- name: Pip Install NumFOCUS nightly
# NumFOCUS nightly wheels, contains numpy and pandas
# TODO(gh-45): Re-add numpy
run: pixi run python -m pip install --pre --upgrade --timeout=60 --extra-index-url https://pypi.anaconda.org/scientific-python-nightly-wheels/simple/ pandas
if: matrix.numfocus_nightly
- name: Install repository
run: pixi run postinstall
- name: Test import
run: |
pixi run python -c "import plateau"
pixi run python -c "import plateau.api"
pixi run python -c "import plateau.api.dataset"
pixi run python -c "import plateau.api.serialization"
pixi run python -c "import plateau.core"
pixi run python -c "import plateau.io"
pixi run python -c "import plateau.io_components"
pixi run python -c "import plateau.serialization"
pixi run python -c "import plateau.utils"
- name: Pytest
# FIXME: Add `-n auto` again to allow for parallelism here.
run: pixi run test-coverage
- name: Codecov
uses: codecov/codecov-action@v5.1.1
with:
file: ./coverage.xml
token: ${{ secrets.CODECOV_TOKEN }}
name: pytest-numfocus_nightly_${{ matrix.numfocus_nightly }}-os_${{ matrix.os }}-pyarrow_${{ matrix.pyarrow }}-${{ matrix.python }}