-
Notifications
You must be signed in to change notification settings - Fork 3
55 lines (44 loc) · 1.56 KB
/
Copy pathpython-test.yaml
File metadata and controls
55 lines (44 loc) · 1.56 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
53
54
55
name: "Test Python Package"
on:
push:
branches:
- "main"
pull_request:
branches:
- "main"
jobs:
test:
runs-on: ubuntu-latest
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v6.0.3
- name: Install uv
uses: astral-sh/setup-uv@fac544c07dec837d0ccb6301d7b5580bf5edae39 # v8.2.0
with:
version: "0.11.10"
enable-cache: true
- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
with:
python-version-file: ".python-version"
- name: Install the project
id: install
run: uv sync --locked --all-extras --dev
- name: Format check with ruff
if: ${{ !cancelled() && steps.install.conclusion == 'success' }}
run: uv run ruff format . --diff
- name: Lint check with ruff
if: ${{ !cancelled() && steps.install.conclusion == 'success' }}
run: uv run ruff check . --output-format=github
- name: Type check with ty
if: ${{ !cancelled() && steps.install.conclusion == 'success' }}
run: uv run ty check
- name: Test with pytest
if: ${{ !cancelled() && steps.install.conclusion == 'success' }}
run: uv run pytest -vv --cov-report term-missing --cov-report xml --cov poreallas
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v6
if: ${{ !cancelled() && steps.install.conclusion == 'success' }}
with:
token: ${{ secrets.CODECOV_TOKEN }}