-
Notifications
You must be signed in to change notification settings - Fork 31
50 lines (40 loc) · 1.6 KB
/
ci.yaml
File metadata and controls
50 lines (40 loc) · 1.6 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
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: python_package
on:
push:
branches: [ master, dev ]
pull_request:
branches: [ master, dev ]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: [ "3.11", "3.12", "3.13" , "3.14" ]
os: [ ubuntu-latest, macos-latest ]
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- name: Install the latest version of uv
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
with:
enable-cache: true
- name: Install Python ${{ matrix.python-version }}
run: uv python install ${{ matrix.python-version }}
- name: Install dependencies
run: make install-ci
- name: Check formatting with black and isort
run: make check-fmt
- name: Lint with flake8
run: make lint
- name: Test and generate coverage report with pytest
run: |
# have to do this as use of tmpdir in tests changes directory
covg_report="$(pwd)/coverage.xml"
uv run pytest --cov=snakefmt --cov-report=xml:$covg_report --cov-branch tests/
- name: Upload coverage to Codecov
uses: codecov/codecov-action@3f20e214133d0983f9a10f3d63b0faf9241a3daa # v6.0.0
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./coverage.xml
flags: unittests