-
Notifications
You must be signed in to change notification settings - Fork 113
99 lines (85 loc) · 2.33 KB
/
test.yml
File metadata and controls
99 lines (85 loc) · 2.33 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
name: Test
on:
schedule:
- cron: 00 00 * * 1 # every Monday at 00:00
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:
inputs:
reason:
description: Reason for the workflow dispatch. Only "release" is valid.
required: true
default: release
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
python: ["3.10", "3.11", "3.12"]
os: [ubuntu-latest]
include:
- python: "3.12"
os: macos-latest
env:
OS: ${{ matrix.os }}
PYTHON: ${{ matrix.python }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python ${{ matrix.python }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
- name: Install uv
uses: astral-sh/setup-uv@v3
with:
enable-cache: true
- name: Install hatch
run: uv tool install hatch
- name: Install dependencies
run: |
./.scripts/ci/install_dependencies.sh
- name: Restore data cache
id: data-cache
uses: actions/cache@v4
with:
path: |
~/.cache/squidpy/*.h5ad
key: data-${{ hashFiles('**/download_data.py') }}
- name: Download datasets
if: steps.data-cache.outputs.cache-hit != 'true'
run: |
hatch run data:download
- name: Test
timeout-minutes: 60
env:
MPLBACKEND: agg
PLATFORM: ${{ matrix.os }}
DISPLAY: :42
PYTEST_ADDOPTS: "-n auto"
run: |
hatch test --python ${{ matrix.python }} --randomize --parallel --cover --all
- name: Archive figures generated during testing
if: always()
uses: actions/upload-artifact@v4
with:
name: visual_test_results_${{ matrix.os }}-python${{ matrix.python }}
path: tests/figures/*
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v5
with:
name: coverage
verbose: true
token: ${{ secrets.CODECOV_TOKEN }}
check:
if: always()
needs: [test]
runs-on: ubuntu-latest
steps:
- uses: re-actors/alls-green@release/v1
with:
jobs: ${{ toJSON(needs) }}