-
Notifications
You must be signed in to change notification settings - Fork 31
39 lines (36 loc) · 1.3 KB
/
python-app.yml
File metadata and controls
39 lines (36 loc) · 1.3 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
name: Python application
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v4.2.2
- name: Install uv
uses: astral-sh/setup-uv@v4
with:
version: "latest"
- name: Set up Python ${{ matrix.python-version }}
run: uv python install ${{ matrix.python-version }}
- name: Install dependencies
run: |
uv sync --all-extras --dev
- name: Lint with ruff
run: |
uv run ruff check .
- name: Format check with black
run: |
uv run black --check .
- name: Install package
run: |
uv pip install -e .
- name: Test with pytest
run: |
uv run pytest --cov-config=pyproject.toml --cov=pystrata --cov=tests --cov-report xml
- name: Run codacy-coverage-reporter
uses: codacy/codacy-coverage-reporter-action@v1.3.0
with:
project-token: ${{ secrets.CODACY_PROJECT_TOKEN }}
coverage-reports: coverage.xml