@@ -8,6 +8,12 @@ name: Check Code Quality
88on :
99 # run pipeline from another workflow
1010 workflow_call :
11+ inputs :
12+ update_dependencies :
13+ type : boolean
14+ description : Update dependencies to their latest version
15+ default : false
16+ required : false
1117
1218concurrency :
1319 group : ${{ github.workflow }}-${{ github.ref }}-code-quality
@@ -16,21 +22,52 @@ concurrency:
1622jobs :
1723 check-code-quality :
1824 runs-on : ubuntu-latest
19-
25+ strategy :
26+ matrix :
27+ python-version : ["3.11", "3.12", "3.13"]
2028 steps :
21- - name : Checkout
22- uses : actions/checkout@v4
29+ - name : Checkout source code
30+ uses : actions/checkout@v5
2331
24- - name : Set up Python
25- uses : actions/setup-python@v5
32+ - name : Install uv
33+ uses : astral-sh/setup-uv@v7
34+ if : ${{ always() }}
2635 with :
27- python-version : 3.11
36+ activate-environment : true
37+ enable-cache : true
38+ python-version : ${{ matrix.python-version }}
2839
29- - name : Upgrade pip
30- run : pip install --upgrade pip
40+ - name : install poe
41+ if : ${{ always() }}
42+ run : uv tool install poethepoet
3143
3244 - name : Install dependencies
33- run : pip install -e .[dev]
34-
35- - name : Run pre-commit on all files
36- run : pre-commit run --all-files
45+ if : ${{ always() }}
46+ run : uv sync --frozen --dev
47+
48+ - name : Update dependencies
49+ if : ${{ inputs.update_dependencies && always() }}
50+ run : uv sync --upgrade --dev
51+
52+ - name : lint
53+ if : ${{ always() }}
54+ run : poe lint --check
55+ - name : format
56+ if : ${{ always() }}
57+ run : poe format --check
58+ - name : lock
59+ if : ${{ always() }}
60+ run : poe lock
61+ - name : type
62+ if : ${{ always() }}
63+ run : poe type
64+ - name : cover
65+ if : ${{ always() }}
66+ run : poe cover
67+ - name : report
68+ if : ${{ always() }}
69+ run : poe report
70+
71+ - name : Actually stop now if any quality control failed
72+ if : ${{ failure() }}
73+ run : exit 1
0 commit comments