-
Notifications
You must be signed in to change notification settings - Fork 1
47 lines (39 loc) · 1.07 KB
/
tests.yaml
File metadata and controls
47 lines (39 loc) · 1.07 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
name: Test
on:
push:
jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.11", "3.12"]
resolution: ["highest", "lowest-direct"]
services:
postgres:
image: postgres
env:
POSTGRES_HOST_AUTH_METHOD: trust
ports:
- 5432:5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
env:
PGUSER: postgres
steps:
- uses: actions/checkout@v2
- name: Set up uv
# Install a specific uv version using the installer
run: curl -LsSf https://astral.sh/uv/0.4.1/install.sh | sh
- name: Test with pytest
run: |
uv sync --extra dev --extra torch --extra jax --resolution ${{ matrix.resolution }} --python ${{ matrix.python-version}}
uv run pytest --cov=src tests
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v2
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: false