-
Notifications
You must be signed in to change notification settings - Fork 201
54 lines (53 loc) · 1.55 KB
/
Copy pathpytest.yml
File metadata and controls
54 lines (53 loc) · 1.55 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
name: Python Tests
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
max-parallel: 4
matrix:
os: [ubuntu-latest, macos-latest]
python-version: ["3.11", "3.13"]
steps:
- uses: actions/checkout@v6
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
- name: Set up uv
uses: astral-sh/setup-uv@v7
with:
cache-dependency-glob: |
uv.lock
pyproject.toml
- name: Install BEDTools (Linux)
run: |
sudo apt-get update
sudo apt-get install --fix-missing bedtools libmagickwand-dev
if: matrix.os == 'ubuntu-latest'
- name: Install BEDTools (macOS)
run: brew install bedtools imagemagick
if: matrix.os == 'macos-latest'
- name: Install dependencies
run: |
if [ -f uv.lock ]; then
uv sync --frozen --extra tests
else
uv sync --extra tests
fi
# Get pytest args from pyproject.toml
- name: Test with pytest
run: |
uv run pytest
# Upload coverage report to Codecov
# Only upload coverage for the latest Python version on Ubuntu
#- name: Upload coverage reports to Codecov
# uses: codecov/codecov-action@v5
# if: matrix.python-version == '3.14' && matrix.os == 'ubuntu-latest'
# with:
# token: ${{ secrets.CODECOV_TOKEN }}
# slug: tanghaibao/jcvi