Skip to content

Commit dff2660

Browse files
Create ci-python.yaml
1 parent ae0df35 commit dff2660

File tree

1 file changed

+59
-0
lines changed

1 file changed

+59
-0
lines changed

.github/workflows/ci-python.yaml

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
# This is a basic workflow to help you get started with Actions
2+
name: python - full
3+
4+
# Controls when the workflow will run
5+
on:
6+
# Triggers the workflow on push or pull request events but only for the main branch
7+
push:
8+
branches: [master]
9+
pull_request:
10+
branches: [master]
11+
schedule:
12+
- cron: "30 22 * * *"
13+
14+
# Allows you to run this workflow manually from the Actions tab
15+
workflow_dispatch:
16+
17+
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
18+
jobs:
19+
# This workflow contains a single job called "build"
20+
build:
21+
# The type of runner that the job will run on
22+
runs-on: ${{ matrix.platform }}
23+
strategy:
24+
max-parallel: 5
25+
matrix:
26+
platform: [ubuntu-latest, macos-latest, windows-latest]
27+
python-version: [3.9, "3.10", "3.11", "3.12", "3.13"]
28+
29+
# Steps represent a sequence of tasks that will be executed as part of the job
30+
steps:
31+
- uses: actions/checkout@v4
32+
- name: Set up Python ${{ matrix.python-version }}
33+
uses: actions/setup-python@v5
34+
with:
35+
python-version: ${{ matrix.python-version }}
36+
- name: Install uv
37+
uses: astral-sh/setup-uv@v6
38+
with:
39+
enable-cache: false
40+
python-version: ${{ matrix.python-version }}
41+
- name: Install dependencies
42+
run: |
43+
uv sync --dev
44+
- name: Test
45+
run: |
46+
uv run black --check --diff --quiet .
47+
uv run isort --check --quiet .
48+
uv run pflake8 .
49+
uv run mypy .
50+
uv run pytest tests/
51+
- name: cov report only for python 3.11 and linux
52+
if: ${{ matrix.python-version == '3.11' && matrix.platform == 'ubuntu-latest' }}
53+
run: |
54+
make test-cov
55+
- name: Upload coverage reports to Codecov only for python 3.11 and linux
56+
if: ${{ matrix.python-version == '3.11' && matrix.platform == 'ubuntu-latest' }}
57+
uses: codecov/codecov-action@v5
58+
with:
59+
token: ${{ secrets.CODECOV_TOKEN }}

0 commit comments

Comments
 (0)