-
Notifications
You must be signed in to change notification settings - Fork 8
59 lines (46 loc) · 1.38 KB
/
code-quality.yml
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
56
57
58
59
name: CI
on:
push:
branches: [main]
pull_request: ~
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
env:
DEFAULT_UV: "0.3.0"
SOURCE: "elkm1_lib"
jobs:
check-quality:
# strategy:
# fail-fast: false
runs-on: ubuntu-latest
steps:
- name: Check out code from GitHub
uses: actions/[email protected]
- name: Set up uv
run: curl -LsSf https://astral.sh/uv/${{ env.DEFAULT_UV }}/install.sh | sh
- name: "Set up Python"
uses: actions/setup-python@v5
with:
python-version-file: "pyproject.toml"
- name: Install the project
run: uv sync --all-extras --dev
- name: Run pylint
run: uv run pylint ${{ env.SOURCE }}
- name: Check code formatting
run: uv run ruff format --check
- name: Check typing
run: uv run mypy --show-error-codes --strict elkm1_lib
# run: |
# source .venv/bin/activate
# mypy --show-error-codes --strict elkm1_lib
- name: Run isort check
run: uv run isort --check-only --profile black .
# run: |
# source .venv/bin/activate
# isort --check-only --profile black .
- name: Run pytest
run: uv run pytest test
# run: |
# source .venv/bin/activate
# poetry install --no-interaction
# pytest test