-
Notifications
You must be signed in to change notification settings - Fork 5
52 lines (44 loc) · 1.6 KB
/
python-app.yml
File metadata and controls
52 lines (44 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
51
52
name: Python package
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
strategy:
max-parallel: 4
matrix:
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13'] # Updated to versions compatible with uv
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install uv
run: curl -LsSf https://astral.sh/uv/install.sh | sh
shell: bash
- name: Install dependencies
run: |
source $HOME/.cargo/env # Ensure uv is in PATH for subsequent steps
uv pip install --system -r requirements.txt
uv pip install --system pytest pytest-cov # For running tests
- name: Install package
run: |
source $HOME/.cargo/env
uv pip install --system .
- name: Lint with black
run: |
source $HOME/.cargo/env
uv run black --check .
- name: Run pytest and Generate coverage report
run: |
source $HOME/.cargo/env
uv run pytest --cov=argmark --cov-report=xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./coverage.xml
name: codecov-umbrella # Optional: can be removed if not specifically needed
fail_ci_if_error: true
env: # Ensure environment variables are available if action needs them
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}