-
Notifications
You must be signed in to change notification settings - Fork 43
47 lines (45 loc) · 1.25 KB
/
buildandtestpython.yml
File metadata and controls
47 lines (45 loc) · 1.25 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: Python package
on:
pull_request:
push:
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [ '3.9', '3.10', '3.11', '3.12', '3.13' ]
steps:
- uses: actions/checkout@v4.2.2
- name: Download Test Data
run: |
bash -x get_test_data.sh
- name: Install uv
uses: astral-sh/setup-uv@v6.3.0
with:
enable-cache: true
cache-dependency-glob: uv.lock
- name: Sync dependencies
run: |
uv python pin ${{ matrix.python-version }}
uv sync --group dev
- uses: astral-sh/ruff-action@v3
- run: ruff check
- run: ruff format
- name: Test with python unittest
run: |
uv run --python ${{ matrix.python-version }} pytest
uv run --python ${{ matrix.python-version }} coverage run -m unittest discover -s tests/
uv run --python ${{ matrix.python-version }} coverage report -m
- name: Coveralls
uses: AndreMiras/coveralls-python-action@develop
with:
parallel: true
flag-name: Unit Test
coveralls_finish:
needs: build
runs-on: ubuntu-latest
steps:
- name: Coveralls Finished
uses: AndreMiras/coveralls-python-action@develop
with:
parallel-finished: true